aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaël Ball <michael.ball@gmail.com>2019-12-03 19:48:08 +0000
committerMichaël Ball <michael.ball@gmail.com>2019-12-03 19:48:08 +0000
commitdee68db62d8019827e27792a7c7bbb15b7eff0ea (patch)
tree64975a364161eb4850da088b1d4824164e1b3174
parentabbcf1109ae10c2b3cc01e49b856d44554f51b01 (diff)
Fix deprecated try calldevelop
-rw-r--r--src/main.rs2
1 files changed, 1 insertions, 1 deletions
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<P>(filename: &P) -> Result<Vec<String>, io::Error>
where
P: AsRef<Path>,
{
- let file = try!(File::open(filename));
+ let file = File::open(filename)?;
let buf = BufReader::new(file);
Ok(buf
.lines()