aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-07 18:10:20 +0200
committerAlex Auvolat <alex@adnab.me>2020-04-07 18:10:20 +0200
commit90cdffb425c6222f4234db54a16c079d8c058724 (patch)
tree2a836af28b5bce3969560fa4f45973b8392629c2 /src/main.rs
parent82b7fcd280d416aabc4f94a99a17c8d9e99888be (diff)
downloadgarage-90cdffb425c6222f4234db54a16c079d8c058724.tar.gz
garage-90cdffb425c6222f4234db54a16c079d8c058724.zip
custom data type for hashes and identifiers
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 2cb4b720..1e4107c2 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -103,7 +103,7 @@ async fn cmd_status(rpc_cli: RpcClient, rpc_host: SocketAddr) -> Result<(), Erro
println!("Healthy nodes:");
for adv in status.iter() {
if let Some(cfg) = config.members.get(&adv.id) {
- println!("{}\t{}\t{}\t{}", hex::encode(adv.id), cfg.datacenter, cfg.n_tokens, adv.addr);
+ println!("{}\t{}\t{}\t{}", hex::encode(&adv.id), cfg.datacenter, cfg.n_tokens, adv.addr);
}
}
@@ -112,7 +112,7 @@ async fn cmd_status(rpc_cli: RpcClient, rpc_host: SocketAddr) -> Result<(), Erro
println!("\nFailed nodes:");
for (id, cfg) in config.members.iter() {
if !status.iter().any(|x| x.id == *id) {
- println!("{}\t{}\t{}", hex::encode(id), cfg.datacenter, cfg.n_tokens);
+ println!("{}\t{}\t{}", hex::encode(&id), cfg.datacenter, cfg.n_tokens);
}
}
}
@@ -121,7 +121,7 @@ async fn cmd_status(rpc_cli: RpcClient, rpc_host: SocketAddr) -> Result<(), Erro
println!("\nUnconfigured nodes:");
for adv in status.iter() {
if !config.members.contains_key(&adv.id) {
- println!("{}\t{}", hex::encode(adv.id), adv.addr);
+ println!("{}\t{}", hex::encode(&adv.id), adv.addr);
}
}
}
@@ -139,7 +139,7 @@ async fn cmd_configure(rpc_cli: RpcClient, rpc_host: SocketAddr, args: Configure
let mut candidates = vec![];
for adv in status.iter() {
- if hex::encode(adv.id).starts_with(&args.node_id) {
+ if hex::encode(&adv.id).starts_with(&args.node_id) {
candidates.push(adv.id.clone());
}
}