Skip to content

Commit

Permalink
style: cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
bpetit authored and bpetit committed Dec 21, 2021
1 parent 569a9a2 commit cf1870e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/sensors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -845,15 +845,17 @@ impl CPUSocket {
debug!("l851 : trying to parse {} as u64", last_rec_val);
let prev_rec_val = previous_record.value.trim();
debug!("l853 : trying to parse {} as u64", prev_rec_val);
if let (Ok(last_microjoules), Ok(previous_microjoules)) = (
last_rec_val.parse::<u64>(),
prev_rec_val.parse::<u64>(),
) {
if let (Ok(last_microjoules), Ok(previous_microjoules)) =
(last_rec_val.parse::<u64>(), prev_rec_val.parse::<u64>())
{
let mut microjoules = 0;
if last_microjoules >= previous_microjoules {
microjoules = last_microjoules - previous_microjoules;
} else {
debug!("previous_microjoules ({}) > last_microjoules ({})", previous_microjoules, last_microjoules);
debug!(
"previous_microjoules ({}) > last_microjoules ({})",
previous_microjoules, last_microjoules
);
}
let time_diff =
last_record.timestamp.as_secs_f64() - previous_record.timestamp.as_secs_f64();
Expand Down

0 comments on commit cf1870e

Please sign in to comment.