Commit Graph

51 Commits

Author SHA1 Message Date
Kevin C
ad1c29c512 Fix comment in errors2 2023-08-14 12:49:28 -07:00
Marcus Höjvall
be8d1df8b9
chore(errors4): improved comment 2023-07-28 23:05:01 +02:00
Anish
eacf7db6f3
refactor: Update comment to use correct construct name 'Result' instead of 'Option'
Refactor the comment in the code to provide a more accurate description of the construct being used. Replace the mention of Option with Result.
2023-06-23 17:18:17 +05:45
Robert Fry
7eef5d15ee
docs: cleanup the explanation paragraphs at the start of each exercise. 2023-05-29 18:41:51 +01:00
Ali Afsharzadeh
1db646474e
docs(error_handling): resolve markdown linter warnings 2023-03-29 21:13:27 +03:30
liv
6d4a87227d
Merge pull request #1437 from navicore/errors2-comment-error
correct comments in errors2.rs
2023-03-26 12:49:59 +00:00
Ed Sweeney
4160b06c6c correct comments in errors2.rs 2023-03-24 21:52:58 -07:00
Gleb Shevchenko
238a496af5 fix: unify undisclosed type notation in errors5.rs 2023-02-18 14:09:04 +01:00
mfurak
152193b459 style: format errors6 with rustfmt 2022-11-06 20:42:17 +01:00
mfurak
d01ce8304e style: format errors5 with rustfmt 2022-11-06 20:32:43 +01:00
mokou
af301a2efe feat(errors5): add simpler explanation for box dyn 2022-08-03 17:31:42 +02:00
mokou
c34e2adcbb feat(errors): Improve comments and hints 2022-07-14 18:02:33 +02:00
Noah Cairns
5e1ca4b995 fix(errors5): improve exercise instructions 2022-07-14 17:59:29 +02:00
Steven nguyen
582320aded chore(errors1): use is_empty() instead of len() > 0
more idiomatic according to clippy
2022-07-14 17:55:07 +02:00
mokou
ed0f278a8f chore: remove mod.rs files and exercises feature 2022-07-11 12:53:49 +02:00
diannasoreil
51817820f2
Merge pull request #961 from J-S-Kim/main
fix(errors6.rs): remove one answer code
2022-04-14 10:44:22 +02:00
mokou
76a36dd385 chore: update errors1 comments and hint 2022-04-14 10:32:43 +02:00
stevenfukase
60bb7cc393
Fix test (#958)
fix(errors1): don't modify tests
2022-04-14 10:25:44 +02:00
J-S-Kim
43d0623086
fix(errors6.rs): remove one answer code
Although marked as 'TODO', three tests pass without any implementation because the correct answer code already exists.
2022-04-09 01:23:58 +09:00
x-hgg-x
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
zydxhs
cbcde34540
fix(errors1): Add a comment to make the purpose more clear (#486)
Signed-off-by: zydxhs <johnsmithcry@163.com>
2022-02-04 15:00:24 +01:00
Taylor Yu
b7ddd09fab address review feedback
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.
2021-06-09 23:27:53 -05:00
Taylor Yu
68d3ac567c feature: improve error_handling exercises
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.
2021-06-06 23:08:57 -05:00
Taylor Yu
50ab289da6 fix: rename result1 to errors4
Also put it in the ERROR HANDLING section where it probably belongs.
2021-06-06 23:08:54 -05:00
Zerotask
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
Zerotask
1120db57a6
docs(errors): add additional help for Result/Boxing
add additional help information provided by the rust by example book
2021-04-22 21:32:29 +02:00
Koalab99
ee7cdc66b3
chore: Removed extra whitespaces
Co-authored-by: Corentin ARNOULD <corentin.arn@gmail.com>
2020-08-27 19:51:19 +02:00
Evan Carroll
2b20c8a0f5
fix(errorsn): Try harder to confine the user. (#388) 2020-05-06 21:12:15 +02:00
Christofer Bertonha
c301814d68 chore: Remove deprecated description from error_handling/errorsn.rs 2020-05-02 18:30:11 +02:00
Ufuk Celebi
6c3cc2caf5
chore: delete orphaned error_handling/option1.rs
`error_handling/option1.rs` has been replaced by `option/option1.rs` and
is not referenced in `info.toml` any more.
2020-04-15 23:52:31 +02:00
marisa
1a7bb5a400 Address feedback 2019-11-11 17:47:45 +01:00
marisa
ec2d4bd3ee
Merge branch 'master' into refactor-hints 2019-11-11 17:21:06 +01:00
marisa
9bdb0a12e4 feat: Refactor hint system
Hints are now accessible using the CLI subcommand `rustlings hint
<exercise name`.

BREAKING CHANGE: This fundamentally changes the way people interact with exercises.
2019-11-11 16:51:38 +01:00
Roberto Vidal
2cdd61294f feat: improve watch execution mode
The `watch` command now requires user action to move to the next
exercise.

BREAKING CHANGE: this changes the behavior of `watch`.
2019-11-11 16:23:35 +01:00
marisa
dcfb427b09 fix(errors3): Update hint
Closes #185.
2019-11-11 13:37:43 +01:00
Niklas Anderson
ead4f7af9e fix(option1): Fix arguments passed to assert! macro 2019-10-25 14:27:24 -07:00
Damian S
8109cbad97 fix(errorsn.rs) Update the deprecated syntax by adding dyn to trait objectscloses #211 2019-08-21 11:44:42 +01:00
Niklas Anderson
a750e4a1a3 fix(option1): Add test for prematurely passing exercise
Fixes the bug referenced in #160, but does not address the larger feature work referenced by the issue.
2019-07-26 16:58:12 -07:00
Russell Cousineau
63c133e4a3 chore: Fix a couple broken book links 2019-06-11 07:13:05 -07:00
bors
8bf8cbbd61 Auto merge of #162 - c-rustacean:rustfmt-and-ws-fixes, r=komaeda
errorsn.rs: Separate also the hints from each other to avoid accidental viewing
2019-05-23 11:01:15 +00:00
Eddy Petrisor
f507844102 errorsn.rs: Separate also the hints from each other to avoid accidental viewing
Signed-off-by: Eddy Petrisor <eddy.petrisor@gmail.com>
2019-05-23 12:21:42 +03:00
bors
fffbb60ed9 Auto merge of #161 - c-rustacean:rustfmt-and-ws-fixes, r=komaeda
Rustfmt and ws fixes
2019-05-22 12:29:20 +00:00
Eddy Petrisor
9aec4abc4d rustfmt the exercises
Signed-off-by: Eddy Petrisor <eddy.petrisor@gmail.com>
2019-05-22 14:50:40 +03:00
Eddy Petrisor
d6d696b66a errorsn.rs: Separate hints from code, so hints are not accidentally seen
Signed-off-by: Eddy Petrisor <eddy.petrisor@gmail.com>
2019-05-22 14:50:39 +03:00
Julien Bisconti
187d2ad226
Update errors1.rs
Add Result type signature as it is difficult for new comers to understand Generics and Error all at once
2019-05-12 14:54:37 +02:00
Diod FR
d7e58ee1af
Fix links by deleting book version 2019-04-08 22:02:04 +02:00
zacanger
c5a374fbf2
Fix permissions on source files 2019-03-23 14:19:42 -06:00
Kyle Isom
c1f4257a91 errors2.rs: update link to Rust book. 2019-03-16 19:22:06 -07:00
delet0r
b0c9b33978 Changed Rust Book versions in links to 2018
Forgot to add changes to last commit.
2018-11-27 10:54:01 +01:00
delet0r
0973e60056 Created sub READMEs for CLI only version
Sub READMEs contain the relevant resources from the main
README of the web version. All second edition Rust Book links
were updated to the 2018 edition.

Fixed to typos in main README.md.
2018-11-26 16:43:42 +01:00