refactor: cargo fmt

This commit is contained in:
Jack Wills
2022-05-30 02:31:20 +00:00
parent 28555d25b2
commit f9075519ed
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -277,7 +277,7 @@ impl Stats for ByteStats {
} }
} }
// convert from bytes to kb, mb, gb etc // convert from bytes to kB, MB, GB etc
impl fmt::Display for ByteStats { impl fmt::Display for ByteStats {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let one_kb = 1000.0; let one_kb = 1000.0;
+1 -1
View File
@@ -304,7 +304,7 @@ impl AppData {
if self.containers.state.selected().is_some() { if self.containers.state.selected().is_some() {
self.containers.previous(); self.containers.previous();
} }
// Check is some, else can cause out of bounds error, if containers get removed before a docker update // Check is some, else can cause out of bounds error, if containers get removed before a docker update
if self.containers.items.get(index).is_some() { if self.containers.items.get(index).is_some() {
self.containers.items.remove(index); self.containers.items.remove(index);
} }
+1 -1
View File
@@ -266,7 +266,7 @@ pub fn draw_chart<B: Backend>(
.constraints([Constraint::Percentage(50), Constraint::Percentage(50)].as_ref()) .constraints([Constraint::Percentage(50), Constraint::Percentage(50)].as_ref())
.split(area); .split(area);
// Check is some, else can cause out of bounds error, if containers get removed before a docker update // Check is some, else can cause out of bounds error, if containers get removed before a docker update
if let Some(data) = app_data.lock().containers.items.get(index) { if let Some(data) = app_data.lock().containers.items.get(index) {
let (cpu, mem) = data.get_chart_data(); let (cpu, mem) = data.get_chart_data();