mirror of
https://github.com/XAMPPRocky/tokei
synced 2024-09-28 20:13:35 +00:00
parent
d193df05ec
commit
2645a116d1
|
@ -52,7 +52,6 @@ pub struct Cli {
|
|||
pub types: Option<Vec<LanguageType>>,
|
||||
pub compact: bool,
|
||||
pub number_format: num_format::CustomFormat,
|
||||
pub verbose: u64,
|
||||
}
|
||||
|
||||
impl Cli {
|
||||
|
@ -312,7 +311,6 @@ impl Cli {
|
|||
types,
|
||||
compact,
|
||||
number_format,
|
||||
verbose,
|
||||
};
|
||||
|
||||
debug!("CLI Config: {:#?}", cli);
|
||||
|
|
|
@ -111,10 +111,6 @@ impl NumberFormatStyle {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn all() -> &'static [&'static str] {
|
||||
&["commas", "dots", "plain", "underscores"]
|
||||
}
|
||||
|
||||
pub fn get_format(self) -> Result<num_format::CustomFormat, num_format::Error> {
|
||||
num_format::CustomFormat::builder()
|
||||
.grouping(num_format::Grouping::Standard)
|
||||
|
|
|
@ -1,12 +1,27 @@
|
|||
// Set of common pub consts.
|
||||
|
||||
/// Fallback row length
|
||||
pub const FALLBACK_ROW_LEN: usize = 81;
|
||||
|
||||
// Column widths used for console printing.
|
||||
|
||||
/// Language column width
|
||||
pub const LANGUAGE_COLUMN_WIDTH: usize = 10;
|
||||
|
||||
/// Path column width
|
||||
pub const PATH_COLUMN_WIDTH: usize = 80;
|
||||
|
||||
/// Files column width
|
||||
pub const FILES_COLUMN_WIDTH: usize = 8;
|
||||
|
||||
/// Lines column width
|
||||
pub const LINES_COLUMN_WIDTH: usize = 12;
|
||||
|
||||
/// Code column width
|
||||
pub const CODE_COLUMN_WIDTH: usize = 12;
|
||||
|
||||
/// Comments column width
|
||||
pub const COMMENTS_COLUMN_WIDTH: usize = 12;
|
||||
|
||||
/// Blanks column width
|
||||
pub const BLANKS_COLUMN_WIDTH: usize = 12;
|
||||
|
|
|
@ -57,6 +57,7 @@ mod stats;
|
|||
|
||||
pub use self::{
|
||||
config::Config,
|
||||
consts::*,
|
||||
language::{Language, LanguageType, Languages},
|
||||
sort::Sort,
|
||||
stats::{find_char_boundary, CodeStats, Report},
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
pub(crate) trait AsciiExt {
|
||||
fn is_whitespace(&self) -> bool;
|
||||
fn is_not_line_ending_whitespace(&self) -> bool;
|
||||
fn is_line_ending_whitespace(&self) -> bool;
|
||||
}
|
||||
|
||||
|
@ -11,10 +10,6 @@ impl AsciiExt for u8 {
|
|||
*self == b' ' || (b'\x09'..=b'\x0d').contains(self)
|
||||
}
|
||||
|
||||
fn is_not_line_ending_whitespace(&self) -> bool {
|
||||
self.is_whitespace() && !self.is_line_ending_whitespace()
|
||||
}
|
||||
|
||||
fn is_line_ending_whitespace(&self) -> bool {
|
||||
*self == b'\n'
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue