aboutsummaryrefslogtreecommitdiff
path: root/src/garage/cli
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-01-26 17:14:17 +0100
committerAlex Auvolat <alex@adnab.me>2023-01-26 17:14:17 +0100
commit3113f6b5f2a688a3f7c4f933774866f48618f7d1 (patch)
tree7169a26aa26c6efa57081b5af0d3c6350eee6393 /src/garage/cli
parent1dff62564fdda392a97986dca55232f30a1f4234 (diff)
downloadgarage-3113f6b5f2a688a3f7c4f933774866f48618f7d1.tar.gz
garage-3113f6b5f2a688a3f7c4f933774866f48618f7d1.zip
more fixes
Diffstat (limited to 'src/garage/cli')
-rw-r--r--src/garage/cli/init.rs4
-rw-r--r--src/garage/cli/util.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/garage/cli/init.rs b/src/garage/cli/init.rs
index 511b53a6..20813f1c 100644
--- a/src/garage/cli/init.rs
+++ b/src/garage/cli/init.rs
@@ -14,11 +14,11 @@ pub fn node_id_command(config_file: PathBuf, quiet: bool) -> Result<(), Error> {
garage_rpc::system::read_node_id(&config.metadata_dir).err_context(READ_KEY_ERROR)?;
let idstr = if let Some(addr) = config.rpc_public_addr {
- let idstr = format!("{}@{}", hex::encode(&node_id), addr);
+ let idstr = format!("{}@{}", hex::encode(node_id), addr);
println!("{}", idstr);
idstr
} else {
- let idstr = hex::encode(&node_id);
+ let idstr = hex::encode(node_id);
println!("{}", idstr);
if !quiet {
diff --git a/src/garage/cli/util.rs b/src/garage/cli/util.rs
index 230ce3de..2c6be2f4 100644
--- a/src/garage/cli/util.rs
+++ b/src/garage/cli/util.rs
@@ -229,7 +229,7 @@ pub fn find_matching_node(
) -> Result<Uuid, Error> {
let mut candidates = vec![];
for c in cand {
- if hex::encode(&c).starts_with(&pattern) && !candidates.contains(&c) {
+ if hex::encode(c).starts_with(pattern) && !candidates.contains(&c) {
candidates.push(c);
}
}