From 3ebdf56259ec057d4e4a6d20f6d84a8c1f0c45ae Mon Sep 17 00:00:00 2001 From: Takeru Ohta Date: Wed, 11 Dec 2019 19:35:27 +0900 Subject: [PATCH] Remove unnecessary `fn main` from examples. --- src/config.rs | 6 ------ src/lib.rs | 4 ---- 2 files changed, 10 deletions(-) diff --git a/src/config.rs b/src/config.rs index 4d8ce58..864b387 100644 --- a/src/config.rs +++ b/src/config.rs @@ -33,12 +33,10 @@ pub trait Config { /// /// use sloggers::LoggerConfig; /// -/// # fn main() { /// let toml = r#" /// type = "null" /// "#; /// let _config: LoggerConfig = serdeconv::from_toml_str(toml).unwrap(); -/// # } /// ``` /// /// Terminal logger. @@ -49,13 +47,11 @@ pub trait Config { /// /// use sloggers::LoggerConfig; /// -/// # fn main() { /// let toml = r#" /// type = "terminal" /// level = "warning" /// "#; /// let _config: LoggerConfig = serdeconv::from_toml_str(toml).unwrap(); -/// # } /// ``` /// /// File logger. @@ -66,14 +62,12 @@ pub trait Config { /// /// use sloggers::LoggerConfig; /// -/// # fn main() { /// let toml = r#" /// type = "file" /// path = "/path/to/file.log" /// timezone = "utc" /// "#; /// let _config: LoggerConfig = serdeconv::from_toml_str(toml).unwrap(); -/// # } /// ``` #[allow(missing_docs)] #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/src/lib.rs b/src/lib.rs index 8d42118..6dedc69 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,14 +14,12 @@ //! use sloggers::terminal::{TerminalLoggerBuilder, Destination}; //! use sloggers::types::Severity; //! -//! # fn main() { //! let mut builder = TerminalLoggerBuilder::new(); //! builder.level(Severity::Debug); //! builder.destination(Destination::Stderr); //! //! let logger = builder.build().unwrap(); //! info!(logger, "Hello World!"); -//! # } //! ``` //! //! Creates a logger from configuration text (TOML): @@ -34,7 +32,6 @@ //! //! use sloggers::{Config, LoggerConfig}; //! -//! # fn main() { //! let config: LoggerConfig = serdeconv::from_toml_str(r#" //! type = "terminal" //! level = "debug" @@ -43,7 +40,6 @@ //! //! let logger = config.build_logger().unwrap(); //! info!(logger, "Hello World!"); -//! # } //! ``` #![warn(missing_docs)] #[macro_use]