Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -312,7 +311,6 @@ impl Cli {
types,
compact,
number_format,
verbose,
};

debug!("CLI Config: {:#?}", cli);
Expand Down
4 changes: 0 additions & 4 deletions src/cli_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 15 additions & 0 deletions src/consts.rs
Original file line number Diff line number Diff line change
@@ -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;
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ mod stats;

pub use self::{
config::Config,
consts::*,
language::{Language, LanguageType, Languages},
sort::Sort,
stats::{find_char_boundary, CodeStats, Report},
Expand Down
5 changes: 0 additions & 5 deletions src/utils/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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'
}
Expand Down
Loading