diff options
| author | bors <bors@rust-lang.org> | 2016-03-23 08:59:10 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-03-23 08:59:10 -0700 |
| commit | b76f818cad31c7910fb6f0fa5e628dbaf4db1108 (patch) | |
| tree | 90110988cefffe1b4a5c104e92eae64f798d4cab /src/libstd/sys/common/gnu | |
| parent | 26cfc269a0ec6a7c895c38954e9701b62940df07 (diff) | |
| parent | c063c5153f778893d6d7296da1c8717ed8212bec (diff) | |
| download | rust-b76f818cad31c7910fb6f0fa5e628dbaf4db1108.tar.gz rust-b76f818cad31c7910fb6f0fa5e628dbaf4db1108.zip | |
Auto merge of #32390 - japaric:untry, r=pnkfelix
convert 99.9% of `try!`s to `?`s The first commit is an automated conversion using the [untry] tool and the following command: ``` $ find -name '*.rs' -type f | xargs untry ``` at the root of the Rust repo. [untry]: https://github.com/japaric/untry cc @rust-lang/lang @alexcrichton @brson
Diffstat (limited to 'src/libstd/sys/common/gnu')
| -rw-r--r-- | src/libstd/sys/common/gnu/libbacktrace.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys/common/gnu/libbacktrace.rs b/src/libstd/sys/common/gnu/libbacktrace.rs index 8b3cb04030c..db719ccce61 100644 --- a/src/libstd/sys/common/gnu/libbacktrace.rs +++ b/src/libstd/sys/common/gnu/libbacktrace.rs @@ -172,9 +172,9 @@ pub fn print(w: &mut Write, idx: isize, addr: *mut libc::c_void, data_addr as *mut libc::c_void) }; if ret == 0 || data.is_null() { - try!(output(w, idx, addr, None)); + output(w, idx, addr, None)?; } else { - try!(output(w, idx, addr, Some(unsafe { CStr::from_ptr(data).to_bytes() }))); + output(w, idx, addr, Some(unsafe { CStr::from_ptr(data).to_bytes() }))?; } // pcinfo may return an arbitrary number of file:line pairs, @@ -198,7 +198,7 @@ pub fn print(w: &mut Write, idx: isize, addr: *mut libc::c_void, for (i, &(file, line)) in fileline_buf[..fileline_count].iter().enumerate() { if file.is_null() { continue; } // just to be sure let file = unsafe { CStr::from_ptr(file).to_bytes() }; - try!(output_fileline(w, file, line, i == FILELINE_SIZE - 1)); + output_fileline(w, file, line, i == FILELINE_SIZE - 1)?; } } |
