Skip to content

Commit 88ec6f6

Browse files
committed
Auto merge of #230 - jrvidal:master, r=fmoko
Changes the execution mode for `watch`, asking for user input We've [observed](https://hackmd.io/-cK6aPhnTwiCiI7u6k0xug?both) that learners can get confused when they do get everything right, but they _still_ get errors... which come from the next exercise, no the one they just edited. This PR changes it so they have to confirm they want to move forward by removing the `I AM NOT DONE` comment. ![Screenshot at 2019-11-11 15:13:39](https://user-images.githubusercontent.com/1636604/68593566-0abd3900-0496-11ea-9e9d-6c43b91bf21d.png) * [ ] The particular string is of course subject to bikeshed. ### Alternatives/doubts * The coolest solution I could imagine would involve a proc-macro attribute `#![ready(false)]` that they could edit once they're done, but it's a bit complicated to set up. * For now I've put `I AM NOT DONE` everywhere, I think it's what make more sense.
2 parents a47a621 + 2cdd612 commit 88ec6f6

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)