Skip to content

Commit

Permalink
ci: clippy suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
Devdutt Shenoi committed Jan 29, 2024
1 parent c17b8c3 commit c23eab6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/utils/src/push_to_uplink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion uplink/src/base/serializer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion uplink/src/collector/systemstats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c23eab6

Please sign in to comment.