From 819f4f00509a57097d0ee8291e1556829e982e14 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 30 Jan 2025 12:19:23 +0100 Subject: cli: migrate layout remove, apply, revert --- src/garage/cli/util.rs | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'src/garage/cli/util.rs') diff --git a/src/garage/cli/util.rs b/src/garage/cli/util.rs index 21c14f42..c591cadd 100644 --- a/src/garage/cli/util.rs +++ b/src/garage/cli/util.rs @@ -233,27 +233,6 @@ pub fn print_bucket_info( }; } -pub fn find_matching_node( - cand: impl std::iter::Iterator, - pattern: &str, -) -> Result { - let mut candidates = vec![]; - for c in cand { - if hex::encode(c).starts_with(pattern) && !candidates.contains(&c) { - candidates.push(c); - } - } - if candidates.len() != 1 { - Err(Error::Message(format!( - "{} nodes match '{}'", - candidates.len(), - pattern, - ))) - } else { - Ok(candidates[0]) - } -} - pub fn print_worker_list(wi: HashMap, wlo: WorkerListOpt) { let mut wi = wi.into_iter().collect::>(); wi.sort_by_key(|(tid, info)| { -- cgit v1.2.3