From 0f02309e4b0ea05ee905205278fb6d131341c41f Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 22 Mar 2016 22:01:37 -0500 Subject: try! -> ? Automated conversion using the untry tool [1] and the following command: ``` $ find -name '*.rs' -type f | xargs untry ``` at the root of the Rust repo. [1]: https://github.com/japaric/untry --- src/libstd/ffi/c_str.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstd/ffi') diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index 1db45764552..52d7bb128d5 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -318,9 +318,9 @@ impl From for Vec { #[stable(feature = "cstr_debug", since = "1.3.0")] impl fmt::Debug for CStr { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - try!(write!(f, "\"")); + write!(f, "\"")?; for byte in self.to_bytes().iter().flat_map(|&b| ascii::escape_default(b)) { - try!(f.write_char(byte as char)); + f.write_char(byte as char)?; } write!(f, "\"") } -- cgit 1.4.1-3-g733a5