Skip to content

Instantly share code, notes, and snippets.

@Yuyz0112
Yuyz0112 / playground.rs
Created June 27, 2017 08:05 — forked from anonymous/playground.rs
Shared via Rust Playground
// 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!
//
// - Reading from stdin could produce an io::Error
// - Parsing the input could produce a num::ParseIntError
// - Validating the input could produce a CreationError (defined below)
//