From 2db9c29d870f5d976bc6e008a0d7c72ccdd73205 Mon Sep 17 00:00:00 2001 From: Mat Hostetter Date: Sun, 2 Jul 2023 09:39:05 -0700 Subject: [PATCH] fix two "unnecessary mut" Rust lints Summary: Two unnecessary `mut` plus `-D warnings` are causing some Hermit code not to build. Reviewed By: VladimirMakaev Differential Revision: D47177379 fbshipit-source-id: 1a58cdbff1c6b275b58a59df7fd01913ad2ca7d5 --- detcore/src/scheduler.rs | 2 +- detcore/src/tool_global.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/detcore/src/scheduler.rs b/detcore/src/scheduler.rs index f9a4ee8..d60604a 100644 --- a/detcore/src/scheduler.rs +++ b/detcore/src/scheduler.rs @@ -1916,7 +1916,7 @@ impl Scheduler { /// Precondition: guest is stopped so that there is no chance the ivars are being used /// concurrently while they are being cleared. fn clear_nextturn(&mut self, dtid: DetTid) { - let mut nextturn = self + let nextturn = self .next_turns .get_mut(&dtid) .expect("clear_nextturn: Thread should be available in next_turns"); diff --git a/detcore/src/tool_global.rs b/detcore/src/tool_global.rs index 96d2cd3..46531bb 100644 --- a/detcore/src/tool_global.rs +++ b/detcore/src/tool_global.rs @@ -900,7 +900,7 @@ impl GlobalState { ); d }; - let mut info = mg + let info = mg .detinodes_info .get_mut(&dino) // TODO(T87258449): remove this `expect`: