diff options
| author | Oliver Schneider <git1984941651981@oli-obk.de> | 2015-03-20 08:19:13 +0100 |
|---|---|---|
| committer | Oliver Schneider <git1984941651981@oli-obk.de> | 2015-03-20 08:19:13 +0100 |
| commit | b4a1e59146c70a12d8c4c1f85c08a2ecf9fb3d2e (patch) | |
| tree | 7b986ee36f81d3566200a9acda28c20b5921e032 /src/libstd/sys/unix/backtrace.rs | |
| parent | 0084f92302b3352372bfd14ebbf083bae695d16e (diff) | |
| download | rust-b4a1e59146c70a12d8c4c1f85c08a2ecf9fb3d2e.tar.gz rust-b4a1e59146c70a12d8c4c1f85c08a2ecf9fb3d2e.zip | |
don't use Result::ok just to be able to use unwrap/unwrap_or
Diffstat (limited to 'src/libstd/sys/unix/backtrace.rs')
| -rw-r--r-- | src/libstd/sys/unix/backtrace.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sys/unix/backtrace.rs b/src/libstd/sys/unix/backtrace.rs index 74ab04978cb..7db64cfb936 100644 --- a/src/libstd/sys/unix/backtrace.rs +++ b/src/libstd/sys/unix/backtrace.rs @@ -454,7 +454,7 @@ fn output(w: &mut Write, idx: int, addr: *mut libc::c_void, #[allow(dead_code)] fn output_fileline(w: &mut Write, file: &[u8], line: libc::c_int, more: bool) -> io::Result<()> { - let file = str::from_utf8(file).ok().unwrap_or("<unknown>"); + let file = str::from_utf8(file).unwrap_or("<unknown>"); // prior line: " ##: {:2$} - func" try!(write!(w, " {:3$}at {}:{}", "", file, line, HEX_WIDTH)); if more { |
