summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErin Power <xampprocky@gmail.com>2020-02-13 17:02:59 +0100
committerErin Power <xampprocky@gmail.com>2020-02-13 17:03:40 +0100
commit38ef393c9370e1af60e6ce3993b35c1d644bbc8f (patch)
treea82d3fa79d5e6140d133bc2e9cb7c7d46ec56fdb
parent4cdc98a76b3facb0a2469332c76995cbaf8e81f8 (diff)
Fixed documentation example
-rw-r--r--src/lib.rs24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 5ea7671..ff23b72 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -13,28 +13,24 @@
//! and all subdirectories.
//!
//! ```no_run
-//! extern crate tokei;
-//!
//! use std::collections::BTreeMap;
//! use std::fs::File;
//! use std::io::Read;
//!
//! use tokei::{Config, Languages, LanguageType};
//!
-//! fn main() {
-//! // The paths to search. Accepts absolute, relative, and glob paths.
-//! let paths = &["src", "tests"];
-//! // Exclude any path that contains any of these strings.
-//! let excluded = &["target"];
-//! // `Config` allows you to configure what is searched and counted.
-//! let config = Config::default();
+//! // The paths to search. Accepts absolute, relative, and glob paths.
+//! let paths = &["src", "tests"];
+//! // Exclude any path that contains any of these strings.
+//! let excluded = &["target"];
+//! // `Config` allows you to configure what is searched and counted.
+//! let config = Config::default();
//!
-//! let mut languages = Languages::new();
-//! languages.get_statistics(paths, excluded, &config);
-//! let rust = &languages[&LanguageType::Rust];
+//! let mut languages = Languages::new();
+//! languages.get_statistics(paths, excluded, &config);
+//! let rust = &languages[&LanguageType::Rust];
//!
-//! println!("Lines of code: {}", rust.code);
-//! }
+//! println!("Lines of code: {}", rust.code);
//! ```
#![deny(