summary refs log tree commit diff
path: root/src/libstd/io/impls.rs
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/io/impls.rs
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/io/impls.rs')
-rw-r--r--src/libstd/io/impls.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/io/impls.rs b/src/libstd/io/impls.rs
index ec63f14d453..31799381563 100644
--- a/src/libstd/io/impls.rs
+++ b/src/libstd/io/impls.rs
@@ -196,7 +196,7 @@ impl<'a> Write for &'a mut [u8] {
 
     #[inline]
     fn write_all(&mut self, data: &[u8]) -> io::Result<()> {
-        if try!(self.write(data)) == data.len() {
+        if self.write(data)? == data.len() {
             Ok(())
         } else {
             Err(Error::new(ErrorKind::WriteZero, "failed to write whole buffer"))