diff options
author | Alex <alex@adnab.me> | 2024-02-09 09:32:54 +0000 |
---|---|---|
committer | Alex <alex@adnab.me> | 2024-02-09 09:32:54 +0000 |
commit | e4a43bfd592c149af8e3eac58ab317a518f0968a (patch) | |
tree | cf34b848df170b3e3289754c77c4a9f61b97a260 /src/model/helper | |
parent | 8061bf5e1c250ff9234894f7a63910fedef1357b (diff) | |
parent | 5c63193d1de909cdecc501b482f5dc269a84874d (diff) | |
download | garage-e4a43bfd592c149af8e3eac58ab317a518f0968a.tar.gz garage-e4a43bfd592c149af8e3eac58ab317a518f0968a.zip |
Merge pull request 'Upgrade toml, kube, k8s-openapi + code fixes' (#709) from dep-upgrade-202402 into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/709
Diffstat (limited to 'src/model/helper')
-rw-r--r-- | src/model/helper/bucket.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/model/helper/bucket.rs b/src/model/helper/bucket.rs index 576d03f3..e9842a91 100644 --- a/src/model/helper/bucket.rs +++ b/src/model/helper/bucket.rs @@ -126,7 +126,7 @@ impl<'a> BucketHelper<'a> { } // Checks ok, add alias - let mut bucket_p = bucket.state.as_option_mut().unwrap(); + let bucket_p = bucket.state.as_option_mut().unwrap(); let alias_ts = increment_logical_clock_2( bucket_p.aliases.get_timestamp(alias_name), @@ -163,7 +163,7 @@ impl<'a> BucketHelper<'a> { alias_name: &String, ) -> Result<(), Error> { let mut bucket = self.get_existing_bucket(bucket_id).await?; - let mut bucket_state = bucket.state.as_option_mut().unwrap(); + let bucket_state = bucket.state.as_option_mut().unwrap(); let mut alias = self .0 @@ -245,7 +245,7 @@ impl<'a> BucketHelper<'a> { self.0.bucket_alias_table.insert(&alias).await?; } - if let Some(mut bucket_state) = bucket.state.as_option_mut() { + if let Some(bucket_state) = bucket.state.as_option_mut() { bucket_state.aliases = LwwMap::raw_item(alias_name.clone(), alias_ts, false); self.0.bucket_table.insert(&bucket).await?; } @@ -274,7 +274,7 @@ impl<'a> BucketHelper<'a> { let mut bucket = self.get_existing_bucket(bucket_id).await?; let mut key = key_helper.get_existing_key(key_id).await?; - let mut key_param = key.state.as_option_mut().unwrap(); + let key_param = key.state.as_option_mut().unwrap(); if let Some(Some(existing_alias)) = key_param.local_aliases.get(alias_name) { if *existing_alias != bucket_id { @@ -283,7 +283,7 @@ impl<'a> BucketHelper<'a> { } // Checks ok, add alias - let mut bucket_p = bucket.state.as_option_mut().unwrap(); + let bucket_p = bucket.state.as_option_mut().unwrap(); let bucket_p_local_alias_key = (key.key_id.clone(), alias_name.clone()); // Calculate the timestamp to assign to this aliasing in the two local_aliases maps @@ -326,7 +326,7 @@ impl<'a> BucketHelper<'a> { let mut bucket = self.get_existing_bucket(bucket_id).await?; let mut key = key_helper.get_existing_key(key_id).await?; - let mut bucket_p = bucket.state.as_option_mut().unwrap(); + let bucket_p = bucket.state.as_option_mut().unwrap(); if key .state @@ -359,7 +359,7 @@ impl<'a> BucketHelper<'a> { } // Checks ok, remove alias - let mut key_param = key.state.as_option_mut().unwrap(); + let key_param = key.state.as_option_mut().unwrap(); let bucket_p_local_alias_key = (key.key_id.clone(), alias_name.clone()); let alias_ts = increment_logical_clock_2( |