mirror of
https://github.com/theryangeary/choose
synced 2025-02-17 01:38:24 +00:00
Add explicit dyn
before Traits
This commit is contained in:
parent
b7c14b9c2d
commit
46d79d7250
1 changed files with 2 additions and 2 deletions
|
@ -40,8 +40,8 @@ fn main() {
|
|||
let opt = Opt::from_args();
|
||||
|
||||
let read = match &opt.input {
|
||||
Some(f) => Box::new(File::open(f).expect("Could not open file")) as Box<Read>,
|
||||
None => Box::new(io::stdin()) as Box<Read>,
|
||||
Some(f) => Box::new(File::open(f).expect("Could not open file")) as Box<dyn Read>,
|
||||
None => Box::new(io::stdin()) as Box<dyn Read>,
|
||||
};
|
||||
|
||||
let buf = BufReader::new(read);
|
||||
|
|
Loading…
Add table
Reference in a new issue