From 10d77d97120c287fa9ee3408ffed7908f4a3ebaa Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 29 Nov 2023 15:34:37 +0100 Subject: [PATCH] fix variables not needing mut warnings Signed-off-by: Wolfgang Bumiller --- pbs-client/src/catalog_shell.rs | 2 +- src/api2/backup/environment.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pbs-client/src/catalog_shell.rs b/pbs-client/src/catalog_shell.rs index f53b3cc52..91bed808c 100644 --- a/pbs-client/src/catalog_shell.rs +++ b/pbs-client/src/catalog_shell.rs @@ -633,7 +633,7 @@ impl Shell { /// This assumes that there are no more symlinks in the path stack. async fn walk_pxar_archive( accessor: &Accessor, - mut stack: &mut [PathStackEntry], + stack: &mut [PathStackEntry], ) -> Result { if stack[0].pxar.is_none() { stack[0].pxar = Some(accessor.open_root().await?.lookup_self().await?); diff --git a/src/api2/backup/environment.rs b/src/api2/backup/environment.rs index 5291bce85..51f4a15b3 100644 --- a/src/api2/backup/environment.rs +++ b/src/api2/backup/environment.rs @@ -179,7 +179,7 @@ impl BackupEnvironment { state.ensure_unfinished()?; - let mut data = match state.fixed_writers.get_mut(&wid) { + let data = match state.fixed_writers.get_mut(&wid) { Some(data) => data, None => bail!("fixed writer '{}' not registered", wid), }; @@ -233,7 +233,7 @@ impl BackupEnvironment { state.ensure_unfinished()?; - let mut data = match state.dynamic_writers.get_mut(&wid) { + let data = match state.dynamic_writers.get_mut(&wid) { Some(data) => data, None => bail!("dynamic writer '{}' not registered", wid), }; @@ -328,7 +328,7 @@ impl BackupEnvironment { state.ensure_unfinished()?; - let mut data = match state.dynamic_writers.get_mut(&wid) { + let data = match state.dynamic_writers.get_mut(&wid) { Some(data) => data, None => bail!("dynamic writer '{}' not registered", wid), }; @@ -362,7 +362,7 @@ impl BackupEnvironment { state.ensure_unfinished()?; - let mut data = match state.fixed_writers.get_mut(&wid) { + let data = match state.fixed_writers.get_mut(&wid) { Some(data) => data, None => bail!("fixed writer '{}' not registered", wid), };