diff options
author | Alex Auvolat <alex@adnab.me> | 2022-01-03 18:32:15 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-01-04 12:52:47 +0100 |
commit | 1bcd6fabbdc0cd9dee88ba28daecb5339f2c13ec (patch) | |
tree | 6a812200ac8e049c21702ae1623a516d6e274f28 /src/garage/cli/util.rs | |
parent | ba7f268b990cd17c5d20bf9e0eb6ff77d30fe845 (diff) | |
download | garage-1bcd6fabbdc0cd9dee88ba28daecb5339f2c13ec.tar.gz garage-1bcd6fabbdc0cd9dee88ba28daecb5339f2c13ec.zip |
New buckets for 0.6.0: small changes
- Fix bucket delete
- fix merge of bucket creation date
- Replace deletable with option in aliases
Rationale: if two aliases point to conflicting bucket, resolving
by making an arbitrary choice risks making data accessible when it
shouldn't be. We'd rather resolve to deleting the alias until
someone puts it back.
Diffstat (limited to 'src/garage/cli/util.rs')
-rw-r--r-- | src/garage/cli/util.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/garage/cli/util.rs b/src/garage/cli/util.rs index b4ea14d1..8d31a4c5 100644 --- a/src/garage/cli/util.rs +++ b/src/garage/cli/util.rs @@ -34,7 +34,7 @@ pub fn print_key_info(key: &Key, relevant_buckets: &HashMap<Uuid, Bucket>) { println!("\nKey-specific bucket aliases:"); let mut table = vec![]; for (alias_name, _, alias) in p.local_aliases.items().iter() { - if let Some(bucket_id) = alias.as_option() { + if let Some(bucket_id) = alias { table.push(format!( "\t{}\t{}\t{}", alias_name, @@ -55,7 +55,7 @@ pub fn print_key_info(key: &Key, relevant_buckets: &HashMap<Uuid, Bucket>) { .local_aliases .items() .iter() - .filter(|(_, _, a)| a.as_option() == Some(bucket_id)) + .filter(|(_, _, a)| *a == Some(*bucket_id)) .map(|(a, _, _)| a.clone()) .collect::<Vec<_>>() .join(", "); |