Skip to content

Commit 2cdd612

Browse files
committed
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`.
1 parent a47a621 commit 2cdd612

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+309
-12
lines changed

Cargo.lock

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ indicatif = "0.9.0"
1010
console = "0.6.2"
1111
notify = "4.0.0"
1212
toml = "0.4.10"
13+
regex = "1.1.6"
1314
serde = {version = "1.0.10", features = ["derive"]}
1415

1516
[[bin]]
@@ -18,3 +19,4 @@ path = "src/main.rs"
1819

1920
[dev-dependencies]
2021
assert_cmd = "0.11.0"
22+
glob = "0.3.0"

exercises/enums/enums1.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// enums1.rs
22
// Make me compile! Scroll down for hints!
33

4+
// I AM NOT DONE
5+
46
#[derive(Debug)]
57
enum Message {
68
// TODO: define a few types of messages as used below

exercises/enums/enums2.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// enums2.rs
22
// Make me compile! Scroll down for hints
33

4+
// I AM NOT DONE
5+
46
#[derive(Debug)]
57
enum Message {
68
// TODO: define the different variants used below

exercises/enums/enums3.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// enums3.rs
22
// Address all the TODOs to make the tests pass!
33

4+
// I AM NOT DONE
5+
46
enum Message {
57
// TODO: implement the message variant types based on their usage below
68
}

exercises/error_handling/errors1.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
// this function to have.
77
// Scroll down for hints!!!
88

9+
// I AM NOT DONE
10+
911
pub fn generate_nametag_text(name: String) -> Option<String> {
1012
if name.len() > 0 {
1113
Some(format!("Hi! My name is {}", name))

exercises/error_handling/errors2.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
// There are at least two ways to implement this that are both correct-- but
1717
// one is a lot shorter! Scroll down for hints to both ways.
1818

19+
// I AM NOT DONE
20+
1921
use std::num::ParseIntError;
2022

2123
pub fn total_cost(item_quantity: &str) -> Result<i32, ParseIntError> {

exercises/error_handling/errors3.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
// `total_cost` function from the previous exercise. It's not working though!
44
// Why not? What should we do to fix it? Scroll for hints!
55

6+
// I AM NOT DONE
7+
68
use std::num::ParseIntError;
79

810
fn main() {

exercises/error_handling/errorsn.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
//
1616
// Scroll down for hints :)
1717

18+
// I AM NOT DONE
19+
1820
use std::error;
1921
use std::fmt;
2022
use std::io;

exercises/error_handling/option1.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// on `None`. Handle this in a more graceful way than calling `unwrap`!
55
// Scroll down for hints :)
66

7+
// I AM NOT DONE
8+
79
pub fn pop_too_much() -> bool {
810
let mut list = vec![3];
911

0 commit comments

Comments
 (0)