You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 KiB

5.5.1 (2023-05-17)

Fixed

  • Reverted rust-project.json path generation due to an upstream rust-analyzer fix.

5.5.0 (2023-05-17)

Added

  • strings2: Added a reference to the book chapter for reference conversion
  • lifetimes: Added a link to the lifetimekata project
  • Added a new tests4 exercises, which teaches about testing for panics
  • Added a ! prefix command to watch mode that runs an external command
  • Added a --success-hints option to watch mode that shows hints on exercise success

Changed

  • vecs2: Renamed iterator variable bindings for clarify
  • lifetimes: Changed order of book references
  • hashmaps2: Clarified instructions in the todo block
  • Moved lifetime exercises before test exercises (via the recommended book ordering)
  • options2: Improved tests for layering options
  • modules2: Added more information to the hint

Fixed

  • errors2: Corrected a comment wording
  • iterators2: Fixed a spelling mistake in the hint text
  • variables: Wrapped the mut keyword with backticks for readability
  • move_semantics2: Removed references to line numbers
  • cow1: Clarified the owned_no_mutation comments
  • options3: Changed exercise to panic when no match is found
  • rustlings lsp now generates absolute paths, which should fix VSCode rust-analyzer usage on Windows

Housekeeping

  • Added a markdown linter to run on GitHub actions
  • Split quick installation section into two code blocks

5.4.1 (2023-03-10)

Changed

  • vecs: Added links to iter_mut and map to README.md
  • cow1: Changed main to tests
  • iterators1: Formatted according to rustfmt

Fixed

  • errors5: Unified undisclosed type notation
  • arc1: Improved readability by avoiding implicit dereference
  • macros4: Prevented auto-fix by adding #[rustfmt::skip]
  • cli: Actually show correct progress percentages

5.4.0 (2023-02-12)

Changed

  • Reordered exercises
    • Unwrapped standard_library_types into iterators and smart_pointers
    • Moved smart pointer exercises behind threads
    • Ordered rc1 before arc1
  • intro1: Added a note on rustlings lsp
  • threads1: Panic if threads are not joined
  • cli:
    • Made progress bar update proportional to amount of files verified
    • Decreased watch delay from 2 to 1 second

Fixed

  • Capitalized "Rust" in exercise hints
  • enums3: Removed superfluous tuple brackets
  • quiz2, clippy1, iterators1: Fixed a typo
  • rc1: Fixed a prompt error
  • cli:
    • Fixed a typo in a method name
    • Specified the edition in rustc commands

Housekeeping

  • Bumped min Rust version to 1.58 in installation script

5.3.0 (2022-12-23)

Added

  • cli: Added a percentage display in watch mode
  • Added a flake.nix for Nix users

Changed

  • structs3: Added an additional test
  • macros: Added a link to MacroKata in the README

Fixed

  • strings3: Added a link to std in the hint
  • threads1: Corrected a hint link
  • iterators1: Clarified hint steps
  • errors5: Fix a typo in the hint
  • options1: Clarified on the usage of the 24-hour system
  • threads2, threads3: Explicitly use Arc::clone
  • structs3: Clarifed the hint
  • quiz2, as_ref_mut, options1, traits1, traits2: Clarified hints
  • traits1, traits2, cli: Tidied up unmatching backticks
  • enums2: Removed unneccessary indirection of self
  • enums3: Added an extra tuple comment

Housekeeping

  • Added a VSCode extension recommendation
  • Applied some Clippy and rustfmt formatting
  • Added a note on Windows PowerShell and other shell compatibility

5.2.1 (2022-09-06)

Fixed

  • quiz1: Reworded the comment to actually reflect what's going on in the tests. Also added another assert just to make sure.
  • rc1: Fixed a typo in the hint.
  • lifetimes: Add quotes to the println! output, for readability.

Housekeeping

  • Fixed a typo in README.md

5.2.0 (2022-08-27)

Added

  • Added a reset command

Changed

  • options2: Convert the exercise to use tests

Fixed

  • threads3: Fixed a typo
  • quiz1: Adjusted the explanations to be consistent with the tests

5.1.1 (2022-08-17)

Bug Fixes

  • Fixed an incorrect assertion in options1

5.1.0 (2022-08-16)

Features

  • Added a new rc1 exercise.
  • Added a new cow1 exercise.

Bug Fixes

  • variables5: Corrected reference to previous exercise
  • functions4: Fixed line number reference
  • strings3: Clarified comment wording
  • traits4, traits5: Fixed line number reference
  • traits5:
    • Fixed typo in "parameter"
    • Made exercise prefer a traits-based solution
  • lifetimes2: Improved hint
  • threads3: Fixed typo in hint
  • box1: Replaced unimplemented! with todo!
  • errors5: Provided an explanation for usage of Box<dyn Error>
  • quiz2: Fixed a typo
  • macros: Updated the macros book link
  • options1:
    • Removed unused code
    • Added more granular tests
  • Fixed some comment syntax shenanigans in info.toml

Housekeeping

  • Fixed a typo in .editorconfig
  • Fixed a typo in integration_tests.rs
  • Clarified manual installation instructions using cargo install --path .
  • Added a link to our Zulip in the readme file

5.0.0 (2022-07-16)

Features

  • Hint comments in exercises now also include a reference to the hint watch mode subcommand.
  • intro1: Added more hints to point the user to the source file.
  • variables: Switched variables3 and variables4.
  • Moved vec and primitive_types exercises before move_semantics.
  • Renamed vec to vecs to be more in line with the naming in general.
  • Split up the collections exercises in their own folders.
  • vec2: Added a second part of the function that provides an alternative, immutable way of modifying vec values.
  • enums3: Added a hint.
  • Moved strings before modules.
  • Added a strings3 exercise to teach modifying strings.
  • Added a hashmaps3 exercise for some advanced usage of hashmaps.
  • Moved the original quiz2 to be strings4, since it only tested strings anyways.
  • Reworked quiz2 into a new exercise that tests more chapters.
  • Renamed option to options.
  • options1: Rewrote parts of the exercise to remove the weird array iteration stuff.
  • Moved generics3 to be quiz3.
  • Moved box/arc exercises behind iterators.
  • iterators4: Added a test for factorials of zero.
  • Split threads1 between two exercises, the first one focusing more on JoinHandles.
  • Added a threads3 exercises that uses std::sync::mpsc.
  • Added a clippy3 exercises with some more interesting checks.
  • as_ref_mut: Added a section that actually tests AsMut.
  • Added 3 new lifetimes exercises.
  • Added 3 new traits exercises.

Bug Fixes

  • variables2: Made output messages more verbose.
  • variables5: Added a nudging hint about shadowing.
  • variables6: Fixed link to book.
  • functions: Clarified the README wording. Generally cleaned up some hints and added some extra comments.
  • if2: Renamed function name to foo_if_fizz.
  • move_semantics: Clarified some hints.
  • quiz1: Renamed the function name to be more verbose.
  • structs1: Use an integer type instead of strings. Renamed "unit structs" to "unit-like structs", as is used in the book.
  • structs3: Added the panic! statement in from the beginning.
  • errors1: Use is_empty() instead of len() > 0
  • errors3: Improved the hint.
  • errors5: Improved exercise instructions and the hint.
  • errors6: Provided the skeleton of one of the functions that's supposed to be implemented.
  • iterators3: Inserted todo! into divide() to keep a compiler error from happening.
  • from_str: Added a hint comment about string error message conversion with Box<dyn Error>.
  • try_from_into: Fixed the function name in comment.

Removed

  • Removed the legacy LSP feature that was using mod.rs files.
  • Removed quiz4.
  • Removed advanced_errs. These were the last exercises in the recommended order, and I've always felt like they didn't quite fit in with the mostly simple, book-following style we've had in Rustlings.

Housekeeping

  • Added missing exercises to the book index.
  • Updated spacing in Cargo.toml.
  • Added a GitHub actions config so that tests run on every PR/commit.

4.8.0 (2022-07-01)

Features

  • Added a progress indicator for rustlings watch.
  • The installation script now checks for Rustup being installed.
  • Added a rustlings lsp command to enable rust-analyzer.

Bug Fixes

  • move_semantics5: Replaced "in vogue" with "in scope" in hint.
  • if2: Fixed a typo in the hint.
  • variables1: Fixed an incorrect line reference in the hint.
  • Fixed an out of bounds check in the installation Bash script.

Housekeeping

  • Replaced the git.io URL with the fully qualified URL because of git.io's sunsetting.
  • Removed the deprecated Rust GitPod extension.

4.7.1 (2022-04-20)

Features

  • The amount of dependency crates that need to be compiled went down from ~65 to ~45 by bumping dependency versions.
  • The minimum Rust version in the install scripts has been bumped to 1.56.0 (this isn't in the release itself, since install scripts don't really get versioned)

Bug Fixes

  • arc1: A small part has been rewritten using a more functional code style (#968).
  • using_as: A small part has been refactored to use sum instead of fold, resulting in better readability.

Housekeeping

  • The changelog will now be manually written instead of being automatically generated by the Git log.

4.7.0 (2022-04-14)

Features

  • Add move_semantics6.rs exercise (#908) (3f0e1303)
  • intro: Add intro section. (21c9f441)
  • Include exercises folder in the project structure behind a feature, enabling rust-analyzer to work (#917) (179a75a6)

Bug Fixes

  • Fix a few spelling mistakes (1c0fe3cb)
  • cli:
    • Move long text strings into constants. (f78c4802)
    • Replace filter_map() with find_map() (9b27e8d)
  • clippy1:
    • Set clippy::float_cmp lint to deny (#907) (71a06044)
    • Updated code to test correctness clippy lint with approx_constant lint rule (f2650de3)
  • errors1:
  • errors6: Remove existing answer code (43d0623)
  • functions5: Remove wrong new line and small English improvements (#885) (8ef4869b)
  • install: protect path with whitespaces using quotes and stop at the first error (d114847f)
  • intro1: Add compiler error explanation. (9b8de655)
  • iterators1: reorder TODO steps (0bd7a063)
  • move_semantics2: Add comment (89650f80)
  • move_semantics5: correct typo (#857) (46c28d5c)
  • quiz1: update to say quiz covers "If" (1622e8c1)
  • structs3:
  • structs3.rs: assigned value to cents_per_gram in test (d1ee2daf)
  • traits1: rename test functions to snake case (#854) (1663a16e)

Documentation improvements

  • Add hints on how to get GCC installed (#741) (bc56861)
  • Fix some code blocks that were not highlighted (17f9d74)

4.6.0 (2021-09-25)

Features

Bug Fixes

4.5.0 (2021-07-07)

Features

Bug Fixes

  • rename result1 to errors4 (50ab289d)
  • move_semantics5 hints (1b858285)
  • remove trailing whitespaces from iterators1 (4d4fa774)
  • add hints to generics1 and generics2 exercises (31457940)
  • remove trailing whitespace (d9b69bd1)
  • installation: first PowerShell command (aa9a943d)
  • iterators5: derive Clone, Copy (91fc9e31)
  • quiz1: Updated question description (#794) (d8766496)
  • try_from_into, from_str: hints for dyn Error (11d2cf0d)
  • variables5: confine the answer further (48ffcbd2)

4.4.0 (2021-04-24)

Bug Fixes

  • Fix spelling error in main.rs (91ee27f2)
  • typo in default out text (644c49f1)
  • collections: Naming exercises for vectors and hashmap (bef39b12)
  • from_str:
    • Correct typos (5f7c89f8)
    • test for error instead of unwrap/should_panic (15e71535)
    • use trait objects for from_str (c3e7b831)
  • functions3: improve function argument type (#687) (a6509cc4)
  • hashmap2: Update incorrect assertion (#660) (72aaa15e)
  • info: Fix typo (#635) (cddc1e86)
  • iterators2: Moved errors out of tests. (baf4ba17, closes #359)
  • iterators3: Enabled iterators3.rs to run without commented out tests. (c6712dfc)
  • main: Let find_exercise work with borrows (347f30bd)
  • move_semantics4:
  • option2: Rename uninformative variables (#675) (b4de6594)
  • quiz3: Force an answer to Q2 (#672) (0d894e6f)
  • structs: Add 5.3 to structs/README (#652) (6bd791f2)
  • structs2: correct grammar in hint (#663) (ebdb66c7)
  • structs3:
    • reword heading comment (#664) (9f3e8c2d)
    • add check to prevent naive implementation of is_international (05a753fe)
  • threads1: line number correction (7857b0a6)
  • try_from_into: use trait objects (2e93a588)

Features

  • Replace clap with argh (7928122f)
  • Replace emojis when NO_EMOJI env variable present (8d62a996)
  • Added iterators5.rs exercise. (b29ea17e)
  • arc1: Add more details to description and hint (#710) (81be4044)
  • cli: Improve the list command with options, and then some (8bbe4ff1)
  • list:

4.3.0 (2020-12-29)

Features

Bug Fixes

  • update structs README (bcf14cf6)
  • added missing exercises to info.toml (90cfb6ff)
  • gives a bit more context to magic number (30644c9a)
  • functions2: Change signature to trigger precise error message: (#605) (0ef95947)
  • structs1: Adjust wording (#573) (9334783d)
  • try_from_into:
  • vec1: Have test compare every element in a and v (9b6c6293)

4.2.0 (2020-11-07)

Features

Bug Fixes

  • log error output when inotify limit is exceeded (d61b4e5a)
  • more unique temp_file (5643ef05)
  • installation: Update the MinRustVersion (21bfb2d4)
  • iterators2: Update description (#578) (197d3a3d)
  • primitive_types6:
    • remove 'unused doc comment' warning (472d8592)
    • missing comma in test (4fb230da)
  • quiz3: Second test is for odd numbers, not even. (#553) (18e0bfef)

4.1.0 (2020-10-05)

Bug Fixes

  • Update rustlings version in Cargo.lock (1cc40bc9)
  • arc1: index mod should equal thread count (b4062ef6)
  • enums3: Update Message::ChangeColor to take a tuple. (#457) (4b6540c7)
  • exercises: adding question mark to quiz2 (101072ab)
  • generics3: clarify grade change (47f7672c)
  • structs3: Small adjustment of variable name (114b54cb)
  • using_as: Add test so that proper type is returned. (#512) (3286c5ec)

Features

4.0.0 (2020-07-08)

Breaking Changes

  • Add a --nocapture option to display test harnesses' outputs (8ad5f9bf)
  • Rename test to quiz, fixes #244 (010a0456)

Features

Bug Fixes

  • Change then to than (ddd98ad7)
  • rename quiz1 to tests1 in info (#420) (0dd1c6ca)
  • fix quiz naming inconsistency (#421) (5563adbb)
  • confine the user further in variable exercises (06ef4cc6)
  • update iterator and macro text for typos and clarity (95900828)
  • update generics2 closes #362 (964c974a)
  • confusing comment in conversions/try_from_into.rs (c9e4f2cf)
  • arc1: Passively introduce attributes (#429) (113cdae2)
  • box1: fix comment typo (#426) (bb2ca251)
  • errorsn: Try harder to confine the user. (#388) (2b20c8a0)
  • from_into.rs: typo (a901499e)
  • generics2: Guide students to the answer (#430) (e6bd8021)
  • installation:
    • Provide a backup git reference when tag can't be curl (9e4fb100)
    • Check if python is available while checking for git,rustc and cargo (9cfb617d)
  • option1:
    • Don't add only zeros to the numbers array (cce6a442)
    • Add cast to usize, as it is confusing in the context of an exercise about Option (f6cffc7e)
  • option2: Add TODO to comments (#400) (10967bce)
  • options1: Add hint about Array Initialization (#389) (9f75554f)
  • test2: name of type String and &str (#394) (d6c0a688)
  • variables6: minor typo (#419) (524e17df)

3.0.0 (2020-04-11)

Breaking Changes

  • make "compile" exercises print output (#278) (3b6d5c)

Bug Fixes

  • primitive_types: revert primitive_types4 (#296) (b3a3351e)
  • run: compile clippy exercise files (#295) (3ab084a4)
  • conversions:
    • add additional test to meet exercise rules (#284) (bc22ec3)
    • remove duplicate not done comment (#292) (dab90f)
  • don't hardcode documentation version for traits (#288) (30e6af)

Features

2.2.1 (2020-02-27)

Bug Fixes

  • Re-add cloning the repo to install scripts (3d9b03c5)

Features

2.2.0 (2020-02-25)

Bug Fixes

  • Update deps to version compatable with aarch64-pc-windows (#263) (19a93428)
  • docs:
    • Added a necessary step to Windows installation process (#242) (3906efcd)
    • Fixed mangled sentence from book; edited for clarity (#266) (ade52ff)
    • Updated iterators readme to account for iterators4 exercise (#273) (bec8e3a)
  • installation: make fatal errors more obvious (#272) (17d0951e)
  • iterators2:
    • Remove reference to missing iterators2.rs (#245) (419f7797)
  • as_ref_mut: Enable a test and improve per clippy's suggestion (#256) (dfdf809)
  • tests1:

Features

2.1.0 (2019-11-27)

Bug Fixes

  • add line numbers in several exercises and hints (b565c4d3)
  • arc1: Fix some words in the comment (c42c3b21)
  • enums: Add link to chapter on pattern syntax (#242) (615ce327)
  • primitive_types4:
  • strings2: update line number in hint (a09f684f)
  • variables1: Correct wrong word in comment (fda5a470)

Features

  • watch: show hint while watching (8143d57b)

2.0.0 (2019-11-12)

Bug Fixes

  • default: Clarify the installation procedure (c371b853)
  • info: Fix trailing newlines for hints (795b6e34)
  • run: make run never prompt (4b265465)

Breaking Changes

Features

  • cli: check for rustc before doing anything (36a033b8)
  • hint: Add test for hint (ce9fa6eb)

1.5.1 (2019-11-11)

Bug Fixes

  • errors3: Update hint (dcfb427b, closes #185)
  • if1: Remove return reference (ad03d180)
  • strings: Move Strings before Structs (6dcecb38, closes #204)
  • structs1: Remove misleading comment (f72e5a8f)
  • threads: Move Threads behind SLT (fbe91a67, closes #205)
  • watch: clear screen before each verify() (3aff590)

1.5.0 (2019-11-09)

Bug Fixes

  • test1: Rewrite logic (79a56942)
  • installation: Fix rustlings installation check (7a252c47)
  • iterators: Rename iterator3.rs (433d2115)
  • iterators2: Remove syntax resulting in misleading error message (4cde8664)
  • option1:
    • Fix arguments passed to assert! macro (#222) (4c2cf6da)
    • Fix arguments passed to assert! macro (ead4f7af)
    • Add test for prematurely passing exercise (a750e4a1)
  • primitive_types4: Fail on a slice covering the wrong area (5b1e673c)
  • readme: http to https (70946b85)
  • test1:
    • Swap assertion parameter order (4086d463)
    • renamed function name to snake case closes #180 (89d5186c)

Features

  • Add enums exercises (dc150321)
  • Added exercise for struct update syntax (1c4c8764)
  • iterators2: adds iterators2 exercise including config (9288fccf)

1.4.1 (2019-08-13)

Bug Fixes

  • iterators2: Remove syntax resulting in misleading error message (4cde8664)
  • option1: Add test for prematurely passing exercise (a750e4a1)
  • test1: Swap assertion parameter order (4086d463)

1.4.0 (2019-07-13)

Bug Fixes

  • installation: Fix rustlings installation check (7a252c47)
  • iterators: Rename iterator3.rs (433d2115)
  • readme: http to https (70946b85)
  • test1: renamed function name to snake case (89d5186c)
  • cli: Check if changed exercise file exists before calling verify (ba85ca3)
  • structs1: Fix the irrefutable let pattern warning (cc6a141)

Features

  • changelog: Use clog for changelogs (34e31232)
  • iterators2: adds iterators2 exercise including config (9288fccf)

1.3.0 (2019-06-05)

Features

  • Adds a simple exercise for structures (#163, @briankung)

Bug Fixes

  • Add Result type signature as it is difficult for new comers to understand Generics and Error all at once. (#157, @veggiemonk)
  • Rustfmt and whitespace fixes (#161, @eddyp)
  • errorsn.rs: Separate also the hints from each other to avoid accidental viewing (#162, @eddyp)
  • fixed outdated links (#165, @gushroom)
  • Fix broken link (#164, @HanKruiger)
  • Remove highlighting and syntect (#167, @komaeda)

1.2.2 (2019-05-07)

Bug Fixes

  • Reverted --nocapture flag since it was causing tests to pass unconditionally

1.2.1 (2019-04-22)

Bug Fixes

  • Fix the --nocapture feature (@komaeda)
  • Provide a nicer error message for when you're in the wrong directory

1.2.0 (2019-04-22)

Features

  • Add errors to exercises that compile without user changes (@yvan-sraka)
  • Use --nocapture when testing, enabling println! when running (@komaeda)

1.1.1 (2019-04-14)

Bug fixes

  • Fix permissions on exercise files (@zacanger, #133)
  • Make installation checks more thorough (@komaeda, 1b3469f236bc6979c27f6e1a04e4138a88e55de3)
  • Fix order of true/false in tests for executables (@mgeier, #137)
  • Stop run from panicking when compile fails (@cjpearce, #141)
  • Fix intermittent test failure caused by race condition (@cjpearce, #140)
  • Fix links by deleting book version (@diodfr, #142)
  • Canonicalize paths to fix path matching (@cjpearce, #143)

1.1.0 (2019-03-20)

  • errors2.rs: update link to Rust book (#124)
  • Start verification at most recently modified file (#120)
  • Watch for file creation events in watch mode (#117)
  • Add standard library types to exercises suite (#119)
  • Give a warning when Rustlings isn't run from the right directory (#123)
  • Verify that rust version is recent enough to install Rustlings (#131)

1.0.1 (2019-03-06)

  • Adds a way to install Rustlings in one command (curl -L https://git.io/rustlings | bash)
  • Makes rustlings watch react to create file events (@shaunbennett, #117)
  • Reworks the exercise management to use an external TOML file instead of just listing them in the code

1.0.0 (2019-03-06)

Initial release.