Skip to content

Commit

Permalink
fix: missed cargo fmt & clippy adjustments after 1st PR correctins
Browse files Browse the repository at this point in the history
  • Loading branch information
RaulTrombin committed Feb 27, 2024
1 parent e34443c commit debb155
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/hardware_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ impl NavigationManager {
NavigationManager::get_instance().lock().unwrap().datalogger = Some(
thread::Builder::new()
.name("Datalogger".into())
.spawn(move || {
NavigationManager::data_logger(refresh_interval, file_path)
})
.spawn(move || NavigationManager::data_logger(refresh_interval, file_path))
.expect("Error: Navigator service: Datalogger can't setup thread"),
)
}
Expand Down Expand Up @@ -111,7 +109,7 @@ impl NavigationManager {

if refresh_interval_us > time_elapsed {
let wait = refresh_interval_us.wrapping_sub(time_elapsed);
thread::sleep(std::time::Duration::from_micros(wait as u64));
thread::sleep(std::time::Duration::from_micros(wait));
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ async fn main() -> std::io::Result<()> {
log::info!("starting datalogger...");
hardware_manager::init_datalogger(
datalogger_settings.interval,
format!("{}/{}", datalogger_settings.directory, datalogger_settings.filename).into()
format!(
"{}/{}",
datalogger_settings.directory, datalogger_settings.filename
)
.into(),
);
}

Expand Down

0 comments on commit debb155

Please sign in to comment.