From 2b20c8a0f5774d07c58d110d75879f33fc6273b5 Mon Sep 17 00:00:00 2001 From: Evan Carroll Date: Wed, 6 May 2020 14:12:15 -0500 Subject: [PATCH] fix(errorsn): Try harder to confine the user. (#388) --- exercises/error_handling/errorsn.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/exercises/error_handling/errorsn.rs b/exercises/error_handling/errorsn.rs index 1b985bf..5fe212b 100644 --- a/exercises/error_handling/errorsn.rs +++ b/exercises/error_handling/errorsn.rs @@ -2,8 +2,10 @@ // This is a bigger error exercise than the previous ones! // You can do it! :) // -// Edit the `read_and_validate` function so that it compiles and -// passes the tests... so many things could go wrong! +// Edit the `read_and_validate` function ONLY. Don't create any Errors +// that do not already exist. +// +// So many things could go wrong! // // - Reading from stdin could produce an io::Error // - Parsing the input could produce a num::ParseIntError @@ -30,6 +32,10 @@ fn read_and_validate(b: &mut dyn io::BufRead) -> Result Result> { let mut b = io::BufReader::new(s.as_bytes());