Skip to content

Commit

Permalink
Fixed documentation example
Browse files Browse the repository at this point in the history
  • Loading branch information
XAMPPRocky committed Feb 13, 2020
1 parent 4cdc98a commit 38ef393
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 38ef393

Please sign in to comment.