| Age | Commit message (Collapse) | Author |
|
|
|
feat(intro): Proposal to add successfully compiling exercise as the first exercise.
|
|
approx_constant lint rule
closes #888
|
|
|
|
|
|
feature: advanced errors
|
|
New exercise to demonstrate traits that make it easier for other code
to consume our custom error types.
|
|
New section and exercise to demonstrate the `From` trait for errors
and its usefulness with the `?` operator.
|
|
Co-authored-by: diannasoriel <mokou@fastmail.com>
|
|
|
|
Added some explanation and links about floating point representation and to use the clippy suggestion. (fixes #390)
|
|
Co-authored-by: marisa <mokou@fastmail.com>
|
|
`collect()` needs some hint for standard_library_types/iterators3 exercise with doc link for understanding different return types via `FromIterator`.
|
|
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.
|
|
fix(iterators5): derive Clone, Copy
|
|
Adjust error text and naming to conform with best practices.
Use `map_err()` instead of `or()`. Wrap lower-level errors instead of
ignoring their details.
Also, don't "cheat" by bypassing the `new()` function in tests.
Fix a dangling reference in the try_from_into hints.
|
|
Add new exercises errors5 and errors6, to introduce boxed errors and
custom error enums more gently. Delete errorsn, because it tried to do
too much too soon.
|
|
Also put it in the ERROR HANDLING section where it probably belongs.
|
|
|
|
Improve the hints for move_semantics5, as well as the explanatory
comments in the code.
Previously, it was not clear what possible changes were allowed.
It seems that reordering the statements might be the intended solution.
The previous comment about not "adding newlines" doesn't make sense,
so treating it as "adding new lines" makes it more clear.
|
|
|
|
* feat: Add move_semantics5 exercise.
* feat: Add option3 exercise
* Address review comments. Fix typos, sentence formatting.
* Remove unwanted newline.
* Address review comments: make comment inline, fix format in print.
|
|
Add hints about how to return the correct type for functions that
return `Result<_, Box<dyn Error>`. Some feedback from Discord suggests
that people run into trouble with that.
|
|
|
|
Co-authored-by: bmacer <bmacer@cisco.com>
Co-authored-by: marisa <mokou@fastmail.com>
Co-authored-by: Roberto Vidal <vidal.roberto.j@gmail.com>
|
|
Added iterators5.rs exercise.
|
|
|
|
Moved iterators2.rs errors out of tests.
|
|
Enabled iterators3.rs to run without commented out tests.
|
|
Update collections exercises naming
|
|
Use `Box<dyn error::Error>` to allow solutions to use `?` to propagate
errors.
|
|
|
|
|
|
is however some --> are however some
|
|
|
|
Closes #359
|
|
|
|
Co-authored-by: John Baber-Lucero <git@frundle.com>
|
|
docs: mention flatten in the options2 hint
|
|
|
|
|
|
Added exercise to book chapter mapping table to exercise README
|
|
Co-authored-by: fmoko <mokou@posteo.de>
|
|
|
|
|
|
primitive_types6 exercise was changed to test yesterday, but info.toml file wasn't updated.
I think this change should fix it.
|
|
|
|
Co-authored-by: Andrew Marquez <andy2mgcc@gmail.com>
|
|
|
|
Co-authored-by: Corentin ARNOULD <corentin.arn@gmail.com>
|