From c6e4586f996bce56f419c55b1cb40935446cb692 Mon Sep 17 00:00:00 2001 From: Jack Rubacha Date: Mon, 23 Dec 2024 12:14:33 -0500 Subject: [PATCH] fixups --- src/numerical.rs | 4 ++-- uploader/src/main.rs | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/numerical.rs b/src/numerical.rs index 7db8b5f..09d65ee 100644 --- a/src/numerical.rs +++ b/src/numerical.rs @@ -67,7 +67,7 @@ pub async fn collect_data( } }; - vec![PublishableMessage{ topic: TOPIC, data: vec![value], unit: UNIT }] + vec![PublishableMessage{ topic: TOPIC, data: vec![value.unwrap()], unit: UNIT }] } _ = cpu_usage_int.tick() => { @@ -96,7 +96,7 @@ pub async fn collect_data( const TOPIC: &str = "TPU/OnBoard/MemAvailable"; const UNIT: &str = "MB"; - sys.refresh_memory_specifics(MemoryRefreshKind::new().with_ram()); + sys.refresh_memory_specifics(MemoryRefreshKind::nothing().with_ram()); vec![PublishableMessage { topic: TOPIC, data: vec![sys.free_memory() as f32 / 1e6], unit: UNIT}] } diff --git a/uploader/src/main.rs b/uploader/src/main.rs index 5988fe1..daa77a3 100644 --- a/uploader/src/main.rs +++ b/uploader/src/main.rs @@ -20,9 +20,9 @@ struct UploaderArgs { } /// Logger module: upload a data_dump.log file to scylla -fn logger_upload<'a>( +fn logger_upload( filepath: &Path, - scylla_uri: &'a str, + scylla_uri: &str, client: &reqwest::blocking::Client, ) -> Result<(), reqwest::Error> { let res = client @@ -36,7 +36,7 @@ fn logger_upload<'a>( res.error_for_status()?; - return Ok(()); + Ok(()) } fn main() { @@ -90,5 +90,8 @@ fn main() { } } - println!("Done, feel free to clear the inside of the {} directory!", cli.output_folder); + println!( + "Done, feel free to clear the inside of the {} directory!", + cli.output_folder + ); }