From d8ce961b674fe7d253c51f40c30c0f061851cf5f Mon Sep 17 00:00:00 2001 From: John Berberian <53021080+LindirQuenya@users.noreply.github.com> Date: Sat, 9 Jul 2022 12:26:25 -0400 Subject: [PATCH] Fix mutability --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index e999e34..97b8fb4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -313,7 +313,7 @@ async fn umount_device( // Verify that this device is indeed mounted. We wouldn't want to try unmounting a device that isn't mounted. { - let mount_status = shared_state.status.lock(); + let mut mount_status = shared_state.status.lock(); if mount_status.changing.contains(&content) { return HTTPResponse { status: 409, @@ -346,7 +346,7 @@ async fn umount_device( // Change the status from mounted to changing, and pick up a list of mounted zips at the same time. let mut mountlist: Vec = vec![BASE_DIR.to_owned()]; { - let mut mount_status = shared_state.status.lock(); + let mount_status = shared_state.status.lock(); for key in &mount_status.mounted { mountlist.push(key.clone()); }