jrvidal / explaine.rs

An interactive Rust syntax playground

Home Page:https://jrvidal.github.io/explaine.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

missing hint: type annotation

phrohdoh opened this issue · 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