diff --git a/.travis.yml b/.travis.yml index 76583883..6bbb8e20 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,8 +25,10 @@ before_install: before_script: - rustup target add $TARGET - rustup component add clippy + #- rustup component add rustfmt script: - cargo clippy -- -D clippy::all + #- cargo fmt -- --check - cargo build --verbose --target $TARGET - cargo test --verbose --target $TARGET diff --git a/Cargo.toml b/Cargo.toml index a8b183a1..10164f78 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,5 +55,6 @@ assets = [ ] extended-description = """\ By default, bottom will look for a config file in ~/.config/bottom/bottom.toml. -If one is not specified it will fall back to defaults. +If one is not specified it will fall back to defaults. If a config file does not +exist at the specified or default location, a blank one will be created for the user. """ diff --git a/README.md b/README.md index 01e0be51..0babdcc3 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ Run using `btm`. - `-s`, `--show_disabled_data` will show data entries in the graph legends even if the lines for that entry are disabled. -- `-C`, `--config` takes in a file path leading to a TOML file. If doesn't exist, creates one. +- `-C`, `--config` takes in a file path leading to a TOML file. If the file doesn't exist, one will be created. - `-b`, `--basic` will enable basic mode, removing all graphs from the main interface and condensing data. diff --git a/src/canvas.rs b/src/canvas.rs index 48cad2ce..0e7bc8ee 100644 --- a/src/canvas.rs +++ b/src/canvas.rs @@ -375,7 +375,7 @@ impl Painter { .constraints([Constraint::Percentage(100)].as_ref()) .split(f.size()); match &app_state.current_widget_selected { - WidgetPosition::Cpu | WidgetPosition::BasicCpu => { + WidgetPosition::Cpu | WidgetPosition::BasicCpu => { let cpu_chunk = Layout::default() .direction(Direction::Horizontal) .margin(0) @@ -385,7 +385,7 @@ impl Painter { } else { [Constraint::Percentage(85), Constraint::Percentage(15)] } - .as_ref(), + .as_ref(), ) .split(rect[0]); @@ -424,7 +424,7 @@ impl Painter { // the same info. let cpu_height = (app_state.canvas_data.cpu_data.len() / 4) as u16 - + ( + + ( if app_state.canvas_data.cpu_data.len() % 4 == 0 { 0 } else { @@ -442,13 +442,13 @@ impl Painter { ].as_ref()) .split(f.size()); - let middle_chunks= Layout::default() - .direction(Direction::Horizontal) - .constraints([ - Constraint::Percentage(50), - Constraint::Percentage(50), - ].as_ref()) - .split(vertical_chunks[2]); + let middle_chunks = Layout::default() + .direction(Direction::Horizontal) + .constraints([ + Constraint::Percentage(50), + Constraint::Percentage(50), + ].as_ref()) + .split(vertical_chunks[2]); self.draw_basic_cpu(&mut f, app_state, vertical_chunks[0]); self.draw_basic_memory(&mut f, app_state, middle_chunks[0]); self.draw_basic_network(&mut f, app_state, middle_chunks[1]); @@ -469,7 +469,7 @@ impl Painter { Constraint::Percentage(37), Constraint::Percentage(33), ] - .as_ref(), + .as_ref(), ) .split(f.size()); @@ -501,7 +501,7 @@ impl Painter { } else { [Constraint::Percentage(85), Constraint::Percentage(15)] } - .as_ref(), + .as_ref(), ) .split(vertical_chunks[0]); diff --git a/src/main.rs b/src/main.rs index db42dfb7..092722fa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -99,7 +99,6 @@ fn get_matches() -> clap::ArgMatches<'static> { .get_matches() } -#[allow(deprecated)] fn main() -> error::Result<()> { create_logger()?; let matches = get_matches();