]> git.lizzy.rs Git - rust.git/commitdiff
Change `try!` to `?`
authorDonnie Bishop <donnie.a.bishop@gmail.com>
Sat, 25 Mar 2017 18:41:37 +0000 (14:41 -0400)
committerGitHub <noreply@github.com>
Sat, 25 Mar 2017 18:41:37 +0000 (14:41 -0400)
src/libcore/str/mod.rs

index ae08a3d0a9a7d0619c9a4dbcb1d5a09c41b0f96a..f3c3994ef3150f41999cb3ed465b9d47b625f9f3 100644 (file)
@@ -58,8 +58,8 @@
 ///                                  .split(",")
 ///                                  .collect();
 ///
-///         let x_fromstr = try!(coords[0].parse::<i32>());
-///         let y_fromstr = try!(coords[1].parse::<i32>());
+///         let x_fromstr = coords[0].parse::<i32>()?;
+///         let y_fromstr = coords[1].parse::<i32>()?;
 ///
 ///         Ok(Point { x: x_fromstr, y: y_fromstr })
 ///     }