From b4a1e59146c70a12d8c4c1f85c08a2ecf9fb3d2e Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Fri, 20 Mar 2015 08:19:13 +0100 Subject: don't use Result::ok just to be able to use unwrap/unwrap_or --- src/libstd/io/cursor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstd/io') diff --git a/src/libstd/io/cursor.rs b/src/libstd/io/cursor.rs index 365f5e37b0b..87e5a2a4488 100644 --- a/src/libstd/io/cursor.rs +++ b/src/libstd/io/cursor.rs @@ -277,7 +277,7 @@ mod tests { fn read_to_end() { let mut reader = Cursor::new(vec!(0, 1, 2, 3, 4, 5, 6, 7)); let mut v = Vec::new(); - reader.read_to_end(&mut v).ok().unwrap(); + reader.read_to_end(&mut v).unwrap(); assert_eq!(v, [0, 1, 2, 3, 4, 5, 6, 7]); } -- cgit 1.4.1-3-g733a5