Skip to content

Commit

Permalink
FLEET-19 Fix clippies
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanrainer committed Oct 16, 2024
1 parent a7c7ad7 commit 260f191
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions apollo-router/src/plugins/fleet_detector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl FleetDetector {
// 'cgroups'
let fses: HashSet<&str> = filesystems_file
.split('\n')
.map(|x| x.trim().split_whitespace().next().unwrap())
.map(|x| x.split_whitespace().next().unwrap())
.filter(|x| x.contains("cgroup"))
.collect();

Expand All @@ -68,9 +68,8 @@ impl FleetDetector {
system_cpus
} else {
// If it's not max then divide the two to get an integer answer
let (a, b) = readings.split_once(" ").unwrap();
let result = a.parse::<u64>().unwrap() / b.parse::<u64>().unwrap();
result
let (a, b) = readings.split_once(' ').unwrap();
a.parse::<u64>().unwrap() / b.parse::<u64>().unwrap();
}
}
Err(_) => system_cpus,
Expand All @@ -90,8 +89,7 @@ impl FleetDetector {
if quota == "-1" {
system_cpus
} else {
let result = quota.parse::<u64>().unwrap() / period.parse::<u64>().unwrap();
result
quota.parse::<u64>().unwrap() / period.parse::<u64>().unwrap();
}
}
_ => system_cpus,
Expand Down

0 comments on commit 260f191

Please sign in to comment.