jrvidal/explaine.rs

missing hint: type annotation

phrohdoh opened this issue · 0 comments

What I expected

Brief explanation of type annotations (and possibly link to book).

Source code

 0 | fn main() {
 1 |   let mut rdr: Box<io::Read> = match input {
   |              ↑-------------↑
 2 |     "-" => Box::new(io::stdin()),
 3 |     _   => Box::new(fs::File::open(input).unwrap()),
 4 |   };
 5 | }

Location: line 1, column 13