Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
HiranmayaGundu committed Sep 11, 2022
1 parent 310e13d commit 29eb919
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ fn main() {
if capacity_kind != CapacityKind::NinetyPercent {
println!(">= 90% capacity {}", time_now);
events_file
.write_all(format!("{}\t>= 90%\n", time_now).as_bytes())
.write_all(format!("{}\t>=90%\n", time_now).as_bytes())
.expect("Failed to write data");
capacity_kind = CapacityKind::NinetyPercent;
}
} else if transmit_capacity >= 80.0 || receive_capacity >= 80.0 {
if capacity_kind != CapacityKind::EightyPercent {
println!(">= 80% capacity {}", time_now);
events_file
.write_all(format!("{}\t>= 80%\n", time_now).as_bytes())
.write_all(format!("{}\t>=80%\n", time_now).as_bytes())
.expect("Failed to write data");
capacity_kind = CapacityKind::EightyPercent;
}
Expand All @@ -134,15 +134,15 @@ fn main() {
.as_secs_f64()
);
events_file
.write_all(format!("{}\t>= 50%\n", time_now).as_bytes())
.write_all(format!("{}\t>=50%\n", time_now).as_bytes())
.expect("Failed to write data");
capacity_kind = CapacityKind::FiftyPercent;
}
} else if capacity_kind != CapacityKind::BelowFiftyPercent {
capacity_kind = CapacityKind::BelowFiftyPercent;
println!("< 50% capacity {}", time_now);
events_file
.write_all(format!("{}\t< 50%\n", time_now).as_bytes())
.write_all(format!("{}\t<50%\n", time_now).as_bytes())
.expect("Failed to write data");
}
old_stats = device;
Expand Down

0 comments on commit 29eb919

Please sign in to comment.