Skip to content

Commit 75696cc

Browse files
authored
Merge pull request #10 from andrewgy8/replace-deprecated-try
Replace deprecated try! with ?
2 parents bd026ee + ffc1f20 commit 75696cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/osm4routing/reader.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ impl Reader {
140140
pub fn read(filename: &str) -> Result<(Vec<Node>, Vec<Edge>), String> {
141141
let mut r = Reader::new();
142142
let path = std::path::Path::new(filename);
143-
let file = try!(std::fs::File::open(&path).map_err(|e| e.to_string()));
143+
let file = std::fs::File::open(&path).map_err(|e| e.to_string())?;
144144
r.read_ways(file);
145-
let file_nodes = try!(std::fs::File::open(&path).map_err(|e| e.to_string()));
145+
let file_nodes = std::fs::File::open(&path).map_err(|e| e.to_string())?;
146146
r.read_nodes(file_nodes);
147147
r.count_nodes_uses();
148148
let edges = r.edges();

0 commit comments

Comments
 (0)