diff options
| author | bors <bors@rust-lang.org> | 2015-03-20 23:16:47 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-03-20 23:16:47 +0000 |
| commit | e2fa53e593a854a609ae9efe5a1bbe15265f0a6f (patch) | |
| tree | 31d6cf6dcb795deb1b8bda95d58cfbf02002000b /src/libstd/thread.rs | |
| parent | 68d69415637186755482d2584e6ba82b67bc1d89 (diff) | |
| parent | b4a1e59146c70a12d8c4c1f85c08a2ecf9fb3d2e (diff) | |
| download | rust-e2fa53e593a854a609ae9efe5a1bbe15265f0a6f.tar.gz rust-e2fa53e593a854a609ae9efe5a1bbe15265f0a6f.zip | |
Auto merge of #23512 - oli-obk:result_ok_unwrap, r=alexcrichton
because then the call to `unwrap()` will not print the error object.
Diffstat (limited to 'src/libstd/thread.rs')
| -rw-r--r-- | src/libstd/thread.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/thread.rs b/src/libstd/thread.rs index d2742d4b45a..99414c771f0 100644 --- a/src/libstd/thread.rs +++ b/src/libstd/thread.rs @@ -869,7 +869,7 @@ mod test { Err(e) => { type T = &'static str; assert!(e.is::<T>()); - assert_eq!(*e.downcast::<T>().ok().unwrap(), "static string"); + assert_eq!(*e.downcast::<T>().unwrap(), "static string"); } Ok(()) => panic!() } @@ -883,7 +883,7 @@ mod test { Err(e) => { type T = String; assert!(e.is::<T>()); - assert_eq!(*e.downcast::<T>().ok().unwrap(), "owned string".to_string()); + assert_eq!(*e.downcast::<T>().unwrap(), "owned string".to_string()); } Ok(()) => panic!() } @@ -897,9 +897,9 @@ mod test { Err(e) => { type T = Box<Any + Send>; assert!(e.is::<T>()); - let any = e.downcast::<T>().ok().unwrap(); + let any = e.downcast::<T>().unwrap(); assert!(any.is::<u16>()); - assert_eq!(*any.downcast::<u16>().ok().unwrap(), 413); + assert_eq!(*any.downcast::<u16>().unwrap(), 413); } Ok(()) => panic!() } |
