Skip to content

Commit d57c183

Browse files
author
ana
committed
release: 4.6.0
1 parent c2ed98d commit d57c183

File tree

5 files changed

+86
-57
lines changed

5 files changed

+86
-57
lines changed

CHANGELOG.md

+26
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
<a name="4.6.0"></a>
2+
## 4.6.0 (2021-09-25)
3+
4+
5+
#### Features
6+
7+
* add advanced_errs2 ([abd6b70c](https://github.com/rust-lang/rustlings/commit/abd6b70c72dc6426752ff41f09160b839e5c449e))
8+
* add advanced_errs1 ([882d535b](https://github.com/rust-lang/rustlings/commit/882d535ba8628d5e0b37e8664b3e2f26260b2671))
9+
* Add a farewell message when quitting `watch` ([1caef0b4](https://github.com/rust-lang/rustlings/commit/1caef0b43494c8b8cdd6c9260147e70d510f1aca))
10+
* add more watch commands ([a7dc080b](https://github.com/rust-lang/rustlings/commit/a7dc080b95e49146fbaafe6922a6de2f8cb1582a), closes [#842](https://github.com/rust-lang/rustlings/issues/842))
11+
* **modules:** update exercises, add modules3 (#822) ([dfd2fab4](https://github.com/rust-lang/rustlings/commit/dfd2fab4f33d1bf59e2e5ee03123c0c9a67a9481))
12+
* **quiz1:** add default function name in comment (#838) ([0a11bad7](https://github.com/rust-lang/rustlings/commit/0a11bad71402b5403143d642f439f57931278c07))
13+
14+
#### Bug Fixes
15+
16+
* Correct small typo in exercises/conversions/from_str.rs ([86cc8529](https://github.com/rust-lang/rustlings/commit/86cc85295ae36948963ae52882e285d7e3e29323))
17+
* **cli:** typo in exercise.rs (#848) ([06d5c097](https://github.com/rust-lang/rustlings/commit/06d5c0973a3dffa3c6c6f70acb775d4c6630323c))
18+
* **from_str, try_from_into:** custom error types ([2dc93cad](https://github.com/rust-lang/rustlings/commit/2dc93caddad43821743e4903d89b355df58d7a49))
19+
* **modules2:** fix typo (#835) ([1c3beb0a](https://github.com/rust-lang/rustlings/commit/1c3beb0a59178c950dc05fe8ee2346b017429ae0))
20+
* **move_semantics5:**
21+
* change &mut *y to &mut x (#814) ([d75759e8](https://github.com/rust-lang/rustlings/commit/d75759e829fdcd64ef071cf4b6eae2a011a7718b))
22+
* Clarify instructions ([df25684c](https://github.com/rust-lang/rustlings/commit/df25684cb79f8413915e00b5efef29369849cef1))
23+
* **quiz1:** Fix inconsistent wording (#826) ([03131a3d](https://github.com/rust-lang/rustlings/commit/03131a3d35d9842598150f9da817f7cc26e2669a))
24+
25+
26+
127
<a name="4.5.0"></a>
228
## 4.5.0 (2021-07-07)
329

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rustlings"
3-
version = "4.5.0"
3+
version = "4.6.0"
44
authors = ["anastasie <[email protected]>", "Carol (Nichols || Goulding) <[email protected]>"]
55
edition = "2018"
66

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ When you get a permission denied message then you have to exclude the directory
6060
Basically: Clone the repository at the latest tag, run `cargo install`.
6161

6262
```bash
63-
# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 4.5.0)
64-
git clone -b 4.5.0 --depth 1 https://github.com/rust-lang/rustlings
63+
# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 4.6.0)
64+
git clone -b 4.6.0 --depth 1 https://github.com/rust-lang/rustlings
6565
cd rustlings
6666
cargo install --force --path .
6767
```

src/main.rs

+56-53
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use std::io::{self, prelude::*};
1111
use std::path::Path;
1212
use std::process::{Command, Stdio};
1313
use std::sync::atomic::{AtomicBool, Ordering};
14-
use std::sync::mpsc::{RecvTimeoutError, channel};
14+
use std::sync::mpsc::{channel, RecvTimeoutError};
1515
use std::sync::{Arc, Mutex};
1616
use std::thread;
1717
use std::time::Duration;
@@ -24,7 +24,7 @@ mod run;
2424
mod verify;
2525

2626
// In sync with crate version
27-
const VERSION: &str = "4.5.0";
27+
const VERSION: &str = "4.6.0";
2828

2929
#[derive(FromArgs, PartialEq, Debug)]
3030
/// Rustlings is a collection of small exercises to get you used to writing and reading Rust code
@@ -217,61 +217,64 @@ fn main() {
217217
verify(&exercises, verbose).unwrap_or_else(|_| std::process::exit(1));
218218
}
219219

220-
Subcommands::Watch(_subargs) => {
221-
match watch(&exercises, verbose) {
222-
Err(e) => {
223-
println!(
224-
"Error: Could not watch your progress. Error message was {:?}.",
225-
e
226-
);
227-
println!("Most likely you've run out of disk space or your 'inotify limit' has been reached.");
228-
std::process::exit(1);
229-
}
230-
Ok(WatchStatus::Finished) => {
231-
println!(
232-
"{emoji} All exercises completed! {emoji}",
233-
emoji = Emoji("🎉", "★")
234-
);
235-
println!();
236-
println!("+----------------------------------------------------+");
237-
println!("| You made it to the Fe-nish line! |");
238-
println!("+-------------------------- ------------------------+");
239-
println!(" \\/ ");
240-
println!(" ▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒ ");
241-
println!(" ▒▒▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒▒▒ ");
242-
println!(" ▒▒▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒▒▒ ");
243-
println!(" ░░▒▒▒▒░░▒▒ ▒▒ ▒▒ ▒▒ ▒▒░░▒▒▒▒ ");
244-
println!(" ▓▓▓▓▓▓▓▓ ▓▓ ▓▓██ ▓▓ ▓▓██ ▓▓ ▓▓▓▓▓▓▓▓ ");
245-
println!(" ▒▒▒▒ ▒▒ ████ ▒▒ ████ ▒▒░░ ▒▒▒▒ ");
246-
println!(" ▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒ ");
247-
println!(" ▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▓▓▒▒▓▓▒▒▒▒▒▒▒▒ ");
248-
println!(" ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ");
249-
println!(" ▒▒▒▒▒▒▒▒▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒▒▒▒▒ ");
250-
println!(" ▒▒ ▒▒▒▒▒▒▒▒▒▒██████▒▒▒▒▒▒▒▒▒▒ ▒▒ ");
251-
println!(" ▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒ ");
252-
println!(" ▒▒ ▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒ ▒▒ ");
253-
println!(" ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ");
254-
println!(" ▒▒ ▒▒ ▒▒ ▒▒ ");
255-
println!();
256-
println!("We hope you enjoyed learning about the various aspects of Rust!");
257-
println!(
258-
"If you noticed any issues, please don't hesitate to report them to our repo."
259-
);
260-
println!("You can also contribute your own exercises to help the greater community!");
261-
println!();
262-
println!("Before reporting an issue or contributing, please read our guidelines:");
263-
println!("https://github.com/rust-lang/rustlings/blob/main/CONTRIBUTING.md");
264-
}
265-
Ok(WatchStatus::Unfinished) => {
266-
println!("We hope you're enjoying learning about Rust!");
267-
println!("If you want to continue working on the exercises at a later point, you can simply run `rustlings watch` again");
268-
}
220+
Subcommands::Watch(_subargs) => match watch(&exercises, verbose) {
221+
Err(e) => {
222+
println!(
223+
"Error: Could not watch your progress. Error message was {:?}.",
224+
e
225+
);
226+
println!("Most likely you've run out of disk space or your 'inotify limit' has been reached.");
227+
std::process::exit(1);
269228
}
270-
}
229+
Ok(WatchStatus::Finished) => {
230+
println!(
231+
"{emoji} All exercises completed! {emoji}",
232+
emoji = Emoji("🎉", "★")
233+
);
234+
println!();
235+
println!("+----------------------------------------------------+");
236+
println!("| You made it to the Fe-nish line! |");
237+
println!("+-------------------------- ------------------------+");
238+
println!(" \\/ ");
239+
println!(" ▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒ ");
240+
println!(" ▒▒▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒▒▒ ");
241+
println!(" ▒▒▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒▒▒ ");
242+
println!(" ░░▒▒▒▒░░▒▒ ▒▒ ▒▒ ▒▒ ▒▒░░▒▒▒▒ ");
243+
println!(" ▓▓▓▓▓▓▓▓ ▓▓ ▓▓██ ▓▓ ▓▓██ ▓▓ ▓▓▓▓▓▓▓▓ ");
244+
println!(" ▒▒▒▒ ▒▒ ████ ▒▒ ████ ▒▒░░ ▒▒▒▒ ");
245+
println!(" ▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒ ");
246+
println!(" ▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▓▓▒▒▓▓▒▒▒▒▒▒▒▒ ");
247+
println!(" ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ");
248+
println!(" ▒▒▒▒▒▒▒▒▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒▒▒▒▒ ");
249+
println!(" ▒▒ ▒▒▒▒▒▒▒▒▒▒██████▒▒▒▒▒▒▒▒▒▒ ▒▒ ");
250+
println!(" ▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒ ");
251+
println!(" ▒▒ ▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒ ▒▒ ");
252+
println!(" ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ");
253+
println!(" ▒▒ ▒▒ ▒▒ ▒▒ ");
254+
println!();
255+
println!("We hope you enjoyed learning about the various aspects of Rust!");
256+
println!(
257+
"If you noticed any issues, please don't hesitate to report them to our repo."
258+
);
259+
println!(
260+
"You can also contribute your own exercises to help the greater community!"
261+
);
262+
println!();
263+
println!("Before reporting an issue or contributing, please read our guidelines:");
264+
println!("https://github.com/rust-lang/rustlings/blob/main/CONTRIBUTING.md");
265+
}
266+
Ok(WatchStatus::Unfinished) => {
267+
println!("We hope you're enjoying learning about Rust!");
268+
println!("If you want to continue working on the exercises at a later point, you can simply run `rustlings watch` again");
269+
}
270+
},
271271
}
272272
}
273273

274-
fn spawn_watch_shell(failed_exercise_hint: &Arc<Mutex<Option<String>>>, should_quit: Arc<AtomicBool>) {
274+
fn spawn_watch_shell(
275+
failed_exercise_hint: &Arc<Mutex<Option<String>>>,
276+
should_quit: Arc<AtomicBool>,
277+
) {
275278
let failed_exercise_hint = Arc::clone(failed_exercise_hint);
276279
println!("Welcome to watch mode! You can type 'help' to get an overview of the commands you can use here.");
277280
thread::spawn(move || loop {

0 commit comments

Comments
 (0)