Commit Graph

66 Commits

Author SHA1 Message Date
Rahat Ahmed 54571a5fca
fix(iterators2): Remove reference to missing iterators2.rs 2019-12-07 23:25:13 -08:00
Jens 31c25ebb50
Add link to chapter on pattern syntax
After being stuck on exercise enums3.rs for about an hour or two, having read the entire chapter on enums 2-3 times, and still being unable to complete the exercise, i started broadening my reading. I finally found the answer in the rust docs via google.
2019-11-24 09:28:33 +01:00
Roberto Vidal b565c4d3e7 fix: line numbers in several exercises and hints
The introduction of `I AM NOT DONE` shifted the lines of all
exercises, which now need adjustment.
2019-11-14 08:21:56 +01:00
Chris Keschnat c42c3b2101
fix(arc1): Fix some words in the comment 2019-11-12 18:37:23 +01:00
Chris Keschnat fda5a47069 fix(variables1): Correct wrong word in comment 2019-11-12 17:33:25 +01:00
Roberto Vidal ded2c034ba fix(primitive_types4): update outdated comment 2019-11-12 12:52:28 +01: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 f72e5a8f05 fix(structs1): Remove misleading comment 2019-11-11 13:57:59 +01:00
marisa 6dcecb38a4 fix(strings): Move Strings before Structs
Closes #204.
2019-11-11 13:46:42 +01:00
marisa dcfb427b09 fix(errors3): Update hint
Closes #185.
2019-11-11 13:37:43 +01:00
marisa ad03d180c9 fix(if1): Remove `return` reference
This closes #153.
2019-11-11 13:34:21 +01:00
bors c6dad28ddc Auto merge of #224 - nyxtom:feat-enums, r=fmoko
feat: Add enums exercises

Creates an exhaustive list of enum exercises. This goes through the basics of different ways to derive enums with mixed data type variants, as well as the use of the all important `match` operator.
2019-11-09 09:41:36 +00:00
marisa 79a569422c
fix: Rewrite test1 logic 2019-10-29 20:53:41 +01:00
Thomas Holloway dc15032112 feat: Add enums exercises 2019-10-28 22:49:49 -05:00
Scott Sweeny 2821227acf chore: Clarify comment in exercises/test1.rs
closes #194

The author of issue #194 suggests that the wording of the comment is at
least ambiguous about the desired results. I believe this change more
clearly describes the expectation of the exercise.
2019-10-28 23:08:46 -04:00
bors 2191ef7eee Auto merge of #219 - vyaslav:master, r=fmoko
Added exercise for struct update syntax

Added one exercise for struct update syntax `struct2.rs`
2019-10-28 22:56:54 +00:00
Niklas Anderson ead4f7af9e fix(option1): Fix arguments passed to assert! macro 2019-10-25 14:27:24 -07:00
Viacheslav Avramenko 1c4c8764ed feat: Added exercise for struct update syntax 2019-10-21 14:50:59 +02: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
Dylan Nugent 5b1e673cec fix(primitive_types4): Fail on a slice covering the wrong area
This commit converts primitive_types4 to a test and asserts that the
slice given is equal to the expected slice.

The intent of the primitive_types4 exercise appears to be to ensure the
user understands inclusive and exclusive bounds as well as slice syntax.
`rustlings` commands using `compile` do not verify that a specific
println is reached and, in the case of `watch` and `verify` (but not
`run`), they do not output the `println`s at all.

This fix is semantically similar to #198. It does not take a stance on
the correct way to handle this for all exercises; see #127. There are
likely other exercises whose intent are masked by this issue.
2019-08-17 17:16:19 -07:00
Enrico Miccoli 76b4cb5c00
chore: Correct typo 2019-08-12 11:45:40 +02:00
Niklas Anderson e3931718fb chore(iterators2): Add exercise instructions 2019-08-09 07:38:21 -07:00
Niklas Anderson 4cde86643e fix(iterators2): Remove syntax resulting in misleading error message
closes #199
2019-08-09 07:37:27 -07:00
Andre Pratama e0db987441
docs: Fix wrong title
fix #200
2019-07-27 22:14:48 +07: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
Pete McFarlane 4086d463a9
fix(test1): Swap assertion parameter order
`Expected` should come before `actual`, other wise it leads to confusing compiler messages, e.g.
```
note: expected type `()`
         found type `{integer}`
```
2019-07-13 13:31:57 +01:00
Jesse 9288fccf07 feat(iterators2): adds iterators2 exercise including config 2019-07-03 21:06:24 +10:00
Jesse 89d5186c0d fix(test1): renamed function name to snake case
closes #180
2019-06-29 01:00:10 +10:00
bors aaad60d07e Auto merge of #172 - miller-time:fix-book-links, r=komaeda
chore: Fix a couple broken book links

While I was fixing these, I figured maybe it's good to just use a consistent URL for book links: https://doc.rust-lang.org/book/

Is there a plan for what to do with this old 1.4.0 example that doesn't exist in the current version of the book? Perhaps at least include a disclaimer when recommending that folks check it out?

34e31232df/exercises/threads/README.md (L1)
2019-06-23 10:31:50 +00:00
bors 5f16469807 Auto merge of #171 - miller-time:rustfmt-exercises, r=komaeda
chore: Clean up some formatting in exercises

I noticed some formatting that isn't consistent with the `rustfmt` style and tried my best to run it on the files in the exercises directory (which does fail for files that can't compile!), which just caught some minor whitespace things here and there.

Note: also can't just apply `rustfmt` blindly because of the blank lines that lead to the hint comments
2019-06-23 10:25:48 +00:00
bors 752bc27e2b Auto merge of #179 - briankung:fix_irrefutable_let_pattern_structs1, r=komaeda
Fixes the irrefutable let pattern warning in `structs1.rs`

PR https://github.com/rust-lang/rustlings/pull/163 accidentally introduced an error using some versions of the Rust compiler where the compiler would (rightly!) complain about an irrefutable let pattern. I have no idea why this did not occur in all versions of the compiler, but here is a way around it.
2019-06-20 15:02:20 +00:00
Brian Kung cc6a14104d Fixes the irrefutable let pattern warning 2019-06-20 09:46:49 -05:00
Russell Cousineau eb13c2b6af chore: Clean up some formatting in exercises 2019-06-11 07:14:43 -07:00
Russell Cousineau 63c133e4a3 chore: Fix a couple broken book links 2019-06-11 07:13:05 -07:00
bors 5586613eec Auto merge of #170 - miller-time:rename-iterator-exercise, r=komaeda
fix(iterators): Rename iterator3.rs

fixes #155
2019-06-11 12:53:58 +00:00
Rohan Prinja 080d6cdd11 chore: Fix link to Arc<T> in the book 2019-06-09 13:45:53 +02:00
Russell Cousineau 433d2115bc fix(iterators): Rename iterator3.rs 2019-06-07 14:42:44 -07:00
bors 41170ce341 Auto merge of #164 - HanKruiger:master, r=komaeda
Fix broken link
2019-05-26 14:07:16 +00:00
gushroom fd1441d122 fixed outdated links 2019-05-26 14:57:56 +02:00
HanKruiger e1422c6443 Fix broken link 2019-05-26 14:45:04 +02:00
Brian Kung 9b92aa08ae Adds a simple exercise for structures 2019-05-25 06:39:58 -05: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 a53b3f199f iterator3.rs: whitespace fixes
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