Skip to content

Commit f452fd7

Browse files
author
liv
committed
release: 5.5.0
1 parent 9508e97 commit f452fd7

File tree

6 files changed

+60
-11
lines changed

6 files changed

+60
-11
lines changed

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1+
<a name="5.5.0"></a>
2+
## 5.5.0 (2023-05-17)
3+
4+
#### Added
5+
6+
- `strings2`: Added a reference to the book chapter for reference conversion
7+
- `lifetimes`: Added a link to the lifetimekata project
8+
- Added a new `tests4` exercises, which teaches about testing for panics
9+
- Added a `!` prefix command to watch mode that runs an external command
10+
- Added a `--success-hints` option to watch mode that shows hints on exercise success
11+
12+
#### Changed
13+
14+
- `vecs2`: Renamed iterator variable bindings for clarify
15+
- `lifetimes`: Changed order of book references
16+
- `hashmaps2`: Clarified instructions in the todo block
17+
- Moved lifetime exercises before test exercises (via the recommended book ordering)
18+
- `options2`: Improved tests for layering options
19+
- `modules2`: Added more information to the hint
20+
21+
#### Fixed
22+
23+
- `errors2`: Corrected a comment wording
24+
- `iterators2`: Fixed a spelling mistake in the hint text
25+
- `variables`: Wrapped the mut keyword with backticks for readability
26+
- `move_semantics2`: Removed references to line numbers
27+
- `cow1`: Clarified the `owned_no_mutation` comments
28+
- `options3`: Changed exercise to panic when no match is found
29+
- `rustlings lsp` now generates absolute paths, which should fix VSCode `rust-analyzer` usage on Windows
30+
31+
#### Housekeeping
32+
33+
- Added a markdown linter to run on GitHub actions
34+
- Split quick installation section into two code blocks
35+
136
<a name="5.4.1"></a>
237
## 5.4.1 (2023-03-10)
338

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rustlings"
3-
version = "5.4.1"
3+
version = "5.5.0"
44
authors = [
55
"Liv <mokou@fastmail.com>",
66
"Carol (Nichols || Goulding) <carol.nichols@gmail.com>",

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ This will install Rustlings and give you access to the `rustlings` command. Run
3636
Basically: Clone the repository at the latest tag, finally run `nix develop` or `nix-shell`.
3737

3838
```bash
39-
# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 5.4.1)
40-
git clone -b 5.4.1 --depth 1 https://github.com/rust-lang/rustlings
39+
# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 5.5.0)
40+
git clone -b 5.5.0 --depth 1 https://github.com/rust-lang/rustlings
4141
cd rustlings
4242
# if nix version > 2.3
4343
nix develop
@@ -74,8 +74,8 @@ If you get a permission denied message, you might have to exclude the directory
7474
Basically: Clone the repository at the latest tag, run `cargo install --path .`.
7575

7676
```bash
77-
# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 5.4.1)
78-
git clone -b 5.4.1 --depth 1 https://github.com/rust-lang/rustlings
77+
# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 5.5.0)
78+
git clone -b 5.5.0 --depth 1 https://github.com/rust-lang/rustlings
7979
cd rustlings
8080
cargo install --force --path .
8181
```

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
rustlings =
2323
pkgs.rustPlatform.buildRustPackage {
2424
name = "rustlings";
25-
version = "5.4.1";
25+
version = "5.5.0";
2626

2727
buildInputs = cargoBuildInputs;
2828

src/main.rs

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ mod run;
2626
mod verify;
2727

2828
// In sync with crate version
29-
const VERSION: &str = "5.4.1";
29+
const VERSION: &str = "5.5.0";
3030

3131
#[derive(FromArgs, PartialEq, Debug)]
3232
/// Rustlings is a collection of small exercises to get you used to writing and reading Rust code
@@ -352,7 +352,11 @@ enum WatchStatus {
352352
Unfinished,
353353
}
354354

355-
fn watch(exercises: &[Exercise], verbose: bool, success_hints: bool) -> notify::Result<WatchStatus> {
355+
fn watch(
356+
exercises: &[Exercise],
357+
verbose: bool,
358+
success_hints: bool,
359+
) -> notify::Result<WatchStatus> {
356360
/* Clears the terminal with an ANSI escape code.
357361
Works in UNIX and newer Windows terminals. */
358362
fn clear_screen() {
@@ -368,7 +372,12 @@ fn watch(exercises: &[Exercise], verbose: bool, success_hints: bool) -> notify::
368372
clear_screen();
369373

370374
let to_owned_hint = |t: &Exercise| t.hint.to_owned();
371-
let failed_exercise_hint = match verify(exercises.iter(), (0, exercises.len()), verbose, success_hints) {
375+
let failed_exercise_hint = match verify(
376+
exercises.iter(),
377+
(0, exercises.len()),
378+
verbose,
379+
success_hints,
380+
) {
372381
Ok(_) => return Ok(WatchStatus::Finished),
373382
Err(exercise) => Arc::new(Mutex::new(Some(to_owned_hint(exercise)))),
374383
};
@@ -390,7 +399,12 @@ fn watch(exercises: &[Exercise], verbose: bool, success_hints: bool) -> notify::
390399
);
391400
let num_done = exercises.iter().filter(|e| e.looks_done()).count();
392401
clear_screen();
393-
match verify(pending_exercises, (num_done, exercises.len()), verbose, success_hints) {
402+
match verify(
403+
pending_exercises,
404+
(num_done, exercises.len()),
405+
verbose,
406+
success_hints,
407+
) {
394408
Ok(_) => return Ok(WatchStatus::Finished),
395409
Err(exercise) => {
396410
let mut failed_exercise_hint = failed_exercise_hint.lock().unwrap();

0 commit comments

Comments
 (0)