From b3750aa34e50c0275036a15f28710f934e33bba3 Mon Sep 17 00:00:00 2001 From: Son Date: Wed, 3 Oct 2018 08:25:31 +1000 Subject: Remove main() from examples --- src/libstd/io/error.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/libstd') 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 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 { -- cgit 1.4.1-3-g733a5