diff --git a/tools/utils/src/push_to_uplink.rs b/tools/utils/src/push_to_uplink.rs index 4d292286..4e882de7 100644 --- a/tools/utils/src/push_to_uplink.rs +++ b/tools/utils/src/push_to_uplink.rs @@ -17,7 +17,7 @@ async fn main() { fn argv_to_payload(pairs: &[String]) -> Value { // nlici - let stream = pairs.get(0).unwrap(); + let stream = pairs.first().unwrap(); let timestamp = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_millis() as u64; let kv_count = pairs.len() - 1; assert_eq!(kv_count % 2, 0); diff --git a/uplink/src/base/serializer/mod.rs b/uplink/src/base/serializer/mod.rs index 0866294a..5ed189df 100644 --- a/uplink/src/base/serializer/mod.rs +++ b/uplink/src/base/serializer/mod.rs @@ -794,7 +794,7 @@ fn check_and_flush_metrics( metrics.set_disk_utilized(disk_utilized); // Send pending metrics. This signifies state change - while let Some(metrics) = pending.get(0) { + while let Some(metrics) = pending.front() { match metrics { SerializerMetrics::Main(metrics) => { // Always send pending metrics. They represent state changes diff --git a/uplink/src/collector/systemstats.rs b/uplink/src/collector/systemstats.rs index cf40fb56..d795515d 100644 --- a/uplink/src/collector/systemstats.rs +++ b/uplink/src/collector/systemstats.rs @@ -613,7 +613,7 @@ impl StatCollector { self.sys.refresh_processes(); let timestamp = clock() as u64; for (&id, p) in self.sys.processes() { - let name = p.cmd().get(0).map(|s| s.to_string()).unwrap_or(p.name().to_string()); + let name = p.cmd().first().map(|s| s.to_string()).unwrap_or(p.name().to_string()); if self.config.system_stats.process_names.contains(&name) { let payload = self.processes.push(id.as_u32(), p, name, timestamp);