From 58a5bcc0b073db99c49cb88de590e2389b1bdfd3 Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Fri, 19 Dec 2025 10:02:33 -0500 Subject: [PATCH] chore: remove unnecessary mutability of self in next_boot_patch (#305) --- library/src/cache/patch_manager.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/src/cache/patch_manager.rs b/library/src/cache/patch_manager.rs index e445fe6..2ab4aa3 100644 --- a/library/src/cache/patch_manager.rs +++ b/library/src/cache/patch_manager.rs @@ -90,7 +90,7 @@ pub trait ManagePatches { /// Returns the next patch to boot, or None if: /// - no patches have been downloaded /// - we cannot boot from the patch(es) on disk - fn next_boot_patch(&mut self) -> Option; + fn next_boot_patch(&self) -> Option; /// Performs integrity checks on the next boot patch and updates the state accordingly. Returns /// an error if the patch exists but is not bootable. @@ -421,7 +421,7 @@ impl ManagePatches for PatchManager { anyhow::Ok(()) } - fn next_boot_patch(&mut self) -> Option { + fn next_boot_patch(&self) -> Option { self.patches_state .next_boot_patch .as_ref() @@ -638,7 +638,7 @@ mod next_boot_patch_tests { #[test] fn returns_none_if_no_next_boot_patch() { let temp_dir = TempDir::new("patch_manager").unwrap(); - let mut manager = PatchManager::manager_for_test(&temp_dir); + let manager = PatchManager::manager_for_test(&temp_dir); assert!(manager.next_boot_patch().is_none()); }