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
This commit is contained in:
Jorge Aparicio
2016-03-22 22:01:37 -05:00
parent 0dcc413e42
commit 0f02309e4b
132 changed files with 3755 additions and 3770 deletions

View File

@@ -487,16 +487,16 @@ impl fmt::Display for Ipv6Addr {
if zeros_len > 1 {
fn fmt_subslice(segments: &[u16], fmt: &mut fmt::Formatter) -> fmt::Result {
if !segments.is_empty() {
try!(write!(fmt, "{:x}", segments[0]));
write!(fmt, "{:x}", segments[0])?;
for &seg in &segments[1..] {
try!(write!(fmt, ":{:x}", seg));
write!(fmt, ":{:x}", seg)?;
}
}
Ok(())
}
try!(fmt_subslice(&self.segments()[..zeros_at], fmt));
try!(fmt.write_str("::"));
fmt_subslice(&self.segments()[..zeros_at], fmt)?;
fmt.write_str("::")?;
fmt_subslice(&self.segments()[zeros_at + zeros_len..], fmt)
} else {
let &[a, b, c, d, e, f, g, h] = &self.segments();