382e16eb7e
feat(docs): add markdown linter for exercises README.md files
2023-03-30 19:53:22 +03:30
a315f2fefb
chore: added more descriptive TODOs
2022-11-24 19:39:54 +00:00
623161e50d
fix: Revert deref change
...
Revert the addition of a deref in PR #1192 by me, which should not be there.
Apologies for the inconvenience caused.
2022-10-21 02:45:31 +02:00
34ed235885
fix: Add a deref in the test code
...
It's virtually impossible to write a the `num_sq` function to take the Box since it doesn't implement `MulAssign`.
2022-09-09 02:40:22 +02:00
9b66b2a0e9
fix(try_from_into): fix function name
2022-07-15 14:08:51 +02:00
4bebdb5f02
feat(as_ref_mut): add AsMut section
2022-07-15 12:50:01 +02:00
81d25aecff
feat(try_from_into): add hint comments
2022-07-15 12:49:49 +02:00
74f44f55e3
feat(conversions): add hint comments
2022-07-15 12:34:10 +02:00
ed0f278a8f
chore: remove mod.rs files and exercises feature
2022-07-11 12:53:49 +02:00
452ab26aa7
refactor(using_as): improve readability by using sum() instead of fold()
2022-04-19 17:37:00 +02:00
179a75a68d
fix: Include exercises folder in the project structure behind a feature ( #917 )
...
closes #859
closes #913
closes #942
2022-03-29 11:44:06 +02:00
c2ed98deb3
Merge pull request #781 from tlyu/advanced-errs
...
feature: advanced errors
2021-09-25 11:18:55 +02:00
6948905716
Merge pull request #737 from ghost/correct-small-typo
...
Correct small typo in exercises/conversions/from_str.rs
2021-07-08 11:07:21 +02:00
2dc93cadda
fix(from_str, try_from_into): custom error types
...
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-06-24 21:33:41 -05:00
86cc85295a
fix: Correct small typo in exercises/conversions/from_str.rs
2021-04-27 21:11:40 +02:00
249ad44cc0
docs(exercises): updated all exercises readme files
...
all exercises readme files now have a unified structure and a description
2021-04-23 19:54:31 +02:00
c3e7b83178
fix: use trait objects for from_str
...
Use `Box<dyn error::Error>` to allow solutions to use `?` to propagate
errors.
2021-04-04 18:56:10 -05:00
2e93a588e0
fix: use trait objects for try_from_into
...
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-04-04 12:41:32 -05:00
5f7c89f85d
fix(from_str): Correct typos
...
typos in the comments
2021-02-21 21:50:17 +01:00
15e71535f3
fix(from_str): test for error instead of unwrap/should_panic
2021-01-21 07:55:22 -05:00
4f1374a6e7
feat(from_into) : add test for checking unnecessary trailing value
2021-01-09 00:08:38 +09:00
5a0521e92c
feat(from_str) : add test for checking unnecessary trailing value
2021-01-09 00:07:13 +09:00
04f1d079aa
feat(try_from_into): remove duplicate annotation
2020-12-03 17:51:30 +01:00
4f4cfcf3c3
fix(try_from_into): type error
2020-11-11 21:02:00 -08:00
96347df9df
fix(try_from_into): Update description ( #584 )
...
Description update
2020-11-08 19:30:40 +01:00
95ccd92616
feat(try_from_into): Add tests ( #571 )
...
Co-authored-by: Volodymyr Patuta <6977238-fiplox@users.noreply.gitlab.com >
2020-11-07 14:01:39 +01:00
2933f51949
chore: Change point to comma in from_into.rs
...
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-25 13:39:52 +02:00
3286c5ec19
fix(using_as): Add test so that proper type is returned. ( #512 )
2020-09-07 19:09:27 +02:00
3144d3ae63
chore: Run rustfmt on exercises
2020-08-10 10:24:21 -04:00
523d18b873
feat(try_from_into): Add insufficient length test ( #469 )
2020-07-13 11:39:05 +02:00
bb5f404e35
chore: Alter whitespace for consistency
...
* Add newline after "I AM DONE" in exercises for consistency
* Remove trailing whitespace from exercises
2020-07-11 11:50:54 -07:00
307252e9ae
Added example to show the AsRef working
2020-06-08 07:51:34 -04:00
763aa6e378
feat: Rewrite try_from_into ( #393 )
2020-05-15 23:02:57 +02:00
a39ffb2fb8
Merge pull request #368 from apatniv/update_test_case
2020-05-03 13:31:46 +02:00
41f989135d
Review Comments: Add other test cases
2020-05-02 20:41:11 -04:00
a901499ede
fix(from_into.rs): typo
2020-04-30 15:53:50 +02:00
19fb1c240c
test: Add missing test case for from_str exercise
2020-04-21 22:51:56 -04:00
c9e4f2cfb4
fix: confusing comment in conversions/try_from_into.rs
...
Co-authored-by: Lebedev <sergey.lebedev@corp.mail.ru >
2020-04-17 15:43:01 +02:00
60393999b8
remove bottom comment instead of top
2020-04-08 11:00:11 +02:00
dab90f7b91
Remove duplicate not done comment
...
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-04-07 17:00:45 +02:00
bc22ec382f
adds additional test to meet exercise rules
2020-03-11 07:58:04 -07:00
dfdf8093eb
Enable a test and improve per clippy's suggestion.
2019-12-23 21:37:09 -05:00
fc26b5e151
I AM NOT DONE comment in conversions exercise files
2019-12-16 11:33:00 -05:00
0c85dc1193
feat: Add type conversion and parsing exercises
2019-12-16 09:12:13 -05:00