summaryrefslogtreecommitdiff
path: root/exercises/conversions
AgeCommit message (Collapse)Author
2022-04-19refactor(using_as): improve readability by using sum() instead of fold()fointard
2022-03-29fix: Include exercises folder in the project structure behind a feature (#917)x-hgg-x
closes #859 closes #913 closes #942
2021-09-25Merge pull request #781 from tlyu/advanced-errsdiannasoriel
feature: advanced errors
2021-07-08Merge pull request #737 from ghost/correct-small-typofmoko
Correct small typo in exercises/conversions/from_str.rs
2021-06-24fix(from_str, try_from_into): custom error typesTaylor Yu
Remove the use of trait objects as errors from `from_str` and `try_from_into`; they seem to have caused a lot of confusion in practice. (Also, it's considered best practice to use custom error types instead of boxed errors in library code.) Instead, use custom error enums, and update hints accordingly. Hints also provide some guidance about converting errors, which could be covered more completely in a future advanced errors section. Also move from_str to directly after the similar exercise `from_into`, for the sake of familiarity when solving.
2021-04-27fix: Correct small typo in exercises/conversions/from_str.rsMartin HART
2021-04-23docs(exercises): updated all exercises readme filesZerotask
all exercises readme files now have a unified structure and a description
2021-04-04fix: use trait objects for from_strTaylor Yu
Use `Box<dyn error::Error>` to allow solutions to use `?` to propagate errors.
2021-04-04fix: use trait objects for try_from_intoTaylor Yu
Use `Box<dyn error::Error>` to allow solutions to use `?` to propagate errors. In the tests, explicitly check `is_ok()` instead of trying to force the error type to `String` (or other `PartialEq` type) using `assert_eq!()`.
2021-02-21fix(from_str): Correct typosJirka Kremser
typos in the comments
2021-01-21fix(from_str): test for error instead of unwrap/should_panicJean-Francois Chevrette
2021-01-09feat(from_into) : add test for checking unnecessary trailing valueSang-Heon Jeon
2021-01-09feat(from_str) : add test for checking unnecessary trailing valueSang-Heon Jeon
2020-12-03feat(try_from_into): remove duplicate annotationChristos Kontas
2020-11-11fix(try_from_into): type errorWei Hu
2020-11-08fix(try_from_into): Update description (#584)JP
Description update
2020-11-07feat(try_from_into): Add tests (#571)fiplox
Co-authored-by: Volodymyr Patuta <6977238-fiplox@users.noreply.gitlab.com>
2020-09-25chore: Change point to comma in from_into.rsGreg Leonard
A typo in the fn test_bad_age() hint message had a point rather than comma Prev: // Test that "Mark.twenty" Current: // Test that "Mark,twenty"
2020-09-07fix(using_as): Add test so that proper type is returned. (#512)Ryan McQuen
2020-08-10chore: Run rustfmt on exercisesÉtienne Barrié
2020-07-13feat(try_from_into): Add insufficient length test (#469)Chad Dougherty
2020-07-11chore: Alter whitespace for consistencyBenjamin Jones
* Add newline after "I AM DONE" in exercises for consistency * Remove trailing whitespace from exercises
2020-06-08Added example to show the AsRef workingmillefalcon
2020-05-15feat: Rewrite try_from_into (#393)IkaR49
2020-05-03Merge pull request #368 from apatniv/update_test_casefmoko
2020-05-02Review Comments: Add other test casesapatniv
2020-04-30fix(from_into.rs): typoJihchi Lee
2020-04-21test: Add missing test case for from_str exerciseapatniv
2020-04-17fix: confusing comment in conversions/try_from_into.rslebedevsergey
Co-authored-by: Lebedev <sergey.lebedev@corp.mail.ru>
2020-04-08remove bottom comment instead of topTonći Galić
2020-04-07Remove duplicate not done commentTonći Galić
As indicated in #259 , I found it confusing to have 2 comments as the code wouldn't compile unless I solved both issues (I used the script from #281 to remove a comment and use `:wn` to go to next exercise, hence this tripped me).
2020-03-11adds additional test to meet exercise rulesskim
2019-12-23Enable a test and improve per clippy's suggestion.dmitri-mamrukov
2019-12-16I AM NOT DONE comment in conversions exercise filesAbdou Seck
2019-12-16feat: Add type conversion and parsing exercisesAbdou Seck