Skip to content
Permalink
Browse files

Fixed documentation example

  • Loading branch information
XAMPPRocky committed Feb 13, 2020
1 parent 4cdc98a commit 38ef393c9370e1af60e6ce3993b35c1d644bbc8f
Showing with 10 additions and 14 deletions.
  1. +10 −14 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(

0 comments on commit 38ef393

Please sign in to comment.
You can’t perform that action at this time.