aboutsummaryrefslogtreecommitdiff
path: root/src/garage/cli/util.rs
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2022-05-09 11:14:55 +0200
committerAlex <alex@adnab.me>2022-05-09 11:14:55 +0200
commit277a20ec449011daab961e17b5c6bd7f48e3c291 (patch)
treed32e8c0e7712e4076bb2b218616d323dfd6e4227 /src/garage/cli/util.rs
parentc9ef3e461b54f36b7fb60e03959416339cd61a9f (diff)
downloadgarage-277a20ec449011daab961e17b5c6bd7f48e3c291.tar.gz
garage-277a20ec449011daab961e17b5c6bd7f48e3c291.zip
Fix `layout show` to not show changes when there are no changes (#297)
fixes #295, partially Co-authored-by: Alex Auvolat <alex@adnab.me> Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/297 Co-authored-by: Alex <alex@adnab.me> Co-committed-by: Alex <alex@adnab.me>
Diffstat (limited to 'src/garage/cli/util.rs')
-rw-r--r--src/garage/cli/util.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/garage/cli/util.rs b/src/garage/cli/util.rs
index 7d496507..fe11ad44 100644
--- a/src/garage/cli/util.rs
+++ b/src/garage/cli/util.rs
@@ -208,7 +208,7 @@ pub fn find_matching_node(
) -> Result<Uuid, Error> {
let mut candidates = vec![];
for c in cand {
- if hex::encode(&c).starts_with(&pattern) {
+ if hex::encode(&c).starts_with(&pattern) && !candidates.contains(&c) {
candidates.push(c);
}
}