diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2020-03-05 02:09:29 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-05 02:09:29 -0500 |
commit | 188858fedda635734bb1906c179103a3abf7eaee (patch) | |
tree | ef5e63efaa86ff5cb11b2349ed5c2f548f89f7a6 /src/canvas.rs | |
parent | d018c6ee886d93203021f97ec184be8a4929e697 (diff) |
Formatting and typos (#63)
* Fix typo and run rustfmt.
* Also add rustfmt check to travis... this might be temporary.
* Add a bit on default config files being created in the debian extended description.
* Add rustup component add to travis.
* Disable rustfmt for now, seems to play weird on windows builds.
* Remove unneccesary deprecate ignore.
Diffstat (limited to 'src/canvas.rs')
-rw-r--r-- | src/canvas.rs | 24 |
1 files changed, 12 insertions, 12 deletions
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]); |