diff options
| author | Son <leson.phung@gmail.com> | 2018-10-03 08:25:31 +1000 |
|---|---|---|
| committer | Son <leson.phung@gmail.com> | 2018-10-03 08:25:31 +1000 |
| commit | b3750aa34e50c0275036a15f28710f934e33bba3 (patch) | |
| tree | c9553349bdfad0c0bf018d6a7bb211482e783b67 /src/libstd | |
| parent | 70f4269d978090d8ce9a334d9694c8a1f1480eba (diff) | |
| download | rust-b3750aa34e50c0275036a15f28710f934e33bba3.tar.gz rust-b3750aa34e50c0275036a15f28710f934e33bba3.zip | |
Remove main() from examples
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io/error.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libstd/io/error.rs b/src/libstd/io/error.rs index cf5b9c75e9f..6515a5540ee 100644 --- a/src/libstd/io/error.rs +++ b/src/libstd/io/error.rs @@ -221,11 +221,9 @@ impl From<ErrorKind> for Error { /// ``` /// use std::io::{Error, ErrorKind}; /// - /// fn main() { - /// let not_found = ErrorKind::NotFound; - /// let error = Error::from(not_found); - /// assert_eq!("entity not found", format!("{}", error)); - /// } + /// let not_found = ErrorKind::NotFound; + /// let error = Error::from(not_found); + /// assert_eq!("entity not found", format!("{}", error)); /// ``` #[inline] fn from(kind: ErrorKind) -> Error { |
