From dee68db62d8019827e27792a7c7bbb15b7eff0ea Mon Sep 17 00:00:00 2001 From: Michaƫl Ball Date: Tue, 3 Dec 2019 19:48:08 +0000 Subject: Fix deprecated try call --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index c8a1e01..f4d1529 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,7 +13,7 @@ fn lines_from_file

(filename: &P) -> Result, io::Error> where P: AsRef, { - let file = try!(File::open(filename)); + let file = File::open(filename)?; let buf = BufReader::new(file); Ok(buf .lines() -- cgit v1.2.3