about summary refs log tree commit diff
path: root/src/libstd/ffi
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2016-03-22 22:01:37 -0500
committerJorge Aparicio <japaricious@gmail.com>2016-03-22 22:01:37 -0500
commit0f02309e4b0ea05ee905205278fb6d131341c41f (patch)
treea259129eeb84705de15b51587ddebd0f82735075 /src/libstd/ffi
parent0dcc413e42f15f4fc51a0ca88a99cc89454ec43d (diff)
downloadrust-0f02309e4b0ea05ee905205278fb6d131341c41f.tar.gz
rust-0f02309e4b0ea05ee905205278fb6d131341c41f.zip
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
Diffstat (limited to 'src/libstd/ffi')
-rw-r--r--src/libstd/ffi/c_str.rs4
1 files changed, 2 insertions, 2 deletions
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<CString> for Vec<u8> {
 #[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, "\"")
     }