File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: e489eaa0c5fb4a9d8b716dc3fc63aa653c22f4ec
2
+ refs/heads/master: 1a5e73a82d6a3e27804ac2f37d1f7dca62ecfc02
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: b3317d68910900f135f9f38e43a7a699bc736b4a
5
5
refs/heads/try: 961e0358e1a5c0faaef606e31e9965742c1643bf
Original file line number Diff line number Diff line change 52
52
//! use std::error::FromError;
53
53
//! use std::{io, str};
54
54
//! use std::fs::File;
55
- //!
55
+ //!
56
56
//! enum MyError { Io(io::Error), Utf8(str::Utf8Error), }
57
- //!
57
+ //!
58
58
//! impl FromError<io::Error> for MyError {
59
59
//! fn from_error(err: io::Error) -> MyError { MyError::Io(err) }
60
60
//! }
61
- //!
61
+ //!
62
62
//! impl FromError<str::Utf8Error> for MyError {
63
63
//! fn from_error(err: str::Utf8Error) -> MyError { MyError::Utf8(err) }
64
64
//! }
65
- //!
65
+ //!
66
66
//! #[allow(unused_variables)]
67
67
//! fn open_and_map() -> Result<(), MyError> {
68
68
//! let b = b"foo.txt";
69
69
//! let s = try!(str::from_utf8(b));
70
70
//! let f = try!(File::open(s));
71
- //!
71
+ //!
72
72
//! // do something interesting here...
73
73
//! Ok(())
74
74
//! }
You can’t perform that action at this time.
0 commit comments