Skip to content

Commit

Permalink
Remove unnecessary fn main from examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
sile committed Dec 11, 2019
1 parent 1477335 commit 3ebdf56
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
6 changes: 0 additions & 6 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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)]
Expand Down
4 changes: 0 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -34,7 +32,6 @@
//!
//! use sloggers::{Config, LoggerConfig};
//!
//! # fn main() {
//! let config: LoggerConfig = serdeconv::from_toml_str(r#"
//! type = "terminal"
//! level = "debug"
Expand All @@ -43,7 +40,6 @@
//!
//! let logger = config.build_logger().unwrap();
//! info!(logger, "Hello World!");
//! # }
//! ```
#![warn(missing_docs)]
#[macro_use]
Expand Down

0 comments on commit 3ebdf56

Please sign in to comment.