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`.
This commit is contained in:
Roberto Vidal
2019-11-11 13:38:24 +01:00
parent a47a62172a
commit 2cdd61294f
60 changed files with 309 additions and 12 deletions

View File

@@ -6,6 +6,8 @@
// this function to have.
// Scroll down for hints!!!
// I AM NOT DONE
pub fn generate_nametag_text(name: String) -> Option<String> {
if name.len() > 0 {
Some(format!("Hi! My name is {}", name))

View File

@@ -16,6 +16,8 @@
// There are at least two ways to implement this that are both correct-- but
// one is a lot shorter! Scroll down for hints to both ways.
// I AM NOT DONE
use std::num::ParseIntError;
pub fn total_cost(item_quantity: &str) -> Result<i32, ParseIntError> {

View File

@@ -3,6 +3,8 @@
// `total_cost` function from the previous exercise. It's not working though!
// Why not? What should we do to fix it? Scroll for hints!
// I AM NOT DONE
use std::num::ParseIntError;
fn main() {

View File

@@ -15,6 +15,8 @@
//
// Scroll down for hints :)
// I AM NOT DONE
use std::error;
use std::fmt;
use std::io;

View File

@@ -4,6 +4,8 @@
// on `None`. Handle this in a more graceful way than calling `unwrap`!
// Scroll down for hints :)
// I AM NOT DONE
pub fn pop_too_much() -> bool {
let mut list = vec![3];

View File

@@ -1,6 +1,8 @@
// result1.rs
// Make this test pass! Scroll down for hints :)
// I AM NOT DONE
#[derive(PartialEq, Debug)]
struct PositiveNonzeroInteger(u64);