Skip to content

Commit c265948

Browse files
deal with clippy
Signed-off-by: Caleb Jones <caleb@calebgj.io>
1 parent d8dfbf1 commit c265948

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

  • odorobo-agent/src/actor
  • odorobo-shared/src/actor_cache

odorobo-agent/src/actor/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,13 +431,13 @@ impl Message<GetAgentStatus> for AgentActor {
431431
_ctx: &mut Context<Self, Self::Reply>,
432432
) -> Self::Reply {
433433

434-
let vcpus_used_by_vms = self.vms.iter()
435-
.map(|(_, vm)| vm.config.cpus.as_ref().map(|cpu_config| cpu_config.boot_vcpus).unwrap_or(0))
434+
let vcpus_used_by_vms = self.vms.values()
435+
.map(|vm| vm.config.cpus.as_ref().map(|cpu_config| cpu_config.boot_vcpus).unwrap_or(0))
436436
.reduce(|acc, cpus| acc + cpus)
437437
.unwrap_or(0) as u32;
438438

439-
let ram_used_by_vms = self.vms.iter()
440-
.map(|(_, vm)| vm.config.memory.as_ref().map(|memory_config| memory_config.size).unwrap_or(0))
439+
let ram_used_by_vms = self.vms.values()
440+
.map(|vm| vm.config.memory.as_ref().map(|memory_config| memory_config.size).unwrap_or(0))
441441
.reduce(|acc, memory| acc + memory)
442442
.unwrap_or(0) as u64;
443443

odorobo-shared/src/actor_cache/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ impl<ParentActor: Actor + RemoteActor, ChildActor: Actor + RemoteActor, Data: Cl
7777
}
7878

7979
/// run this function inside of the on_link_died of the ParentActor
80-
8180
pub async fn on_link_died(
8281
&self,
8382
id: ActorId

0 commit comments

Comments
 (0)