Skip to content

Commit

Permalink
Fix mutability
Browse files Browse the repository at this point in the history
  • Loading branch information
LindirQuenya authored Jul 9, 2022
1 parent 5396fe0 commit d8ce961
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ async fn umount_device<T: BuildHasher>(

// 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,
Expand Down Expand Up @@ -346,7 +346,7 @@ async fn umount_device<T: BuildHasher>(
// Change the status from mounted to changing, and pick up a list of mounted zips at the same time.
let mut mountlist: Vec<String> = 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());
}
Expand Down

0 comments on commit d8ce961

Please sign in to comment.