mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-28 07:57:02 +00:00
More clippy fixes
This commit is contained in:
+1
-1
@@ -113,7 +113,7 @@ impl ConsulDiscovery {
|
||||
let pubkey = ent
|
||||
.node_meta
|
||||
.get("pubkey")
|
||||
.and_then(|k| hex::decode(&k).ok())
|
||||
.and_then(|k| hex::decode(k).ok())
|
||||
.and_then(|k| NodeID::from_slice(&k[..]));
|
||||
if let (Some(ip), Some(pubkey)) = (ip, pubkey) {
|
||||
ret.push((pubkey, SocketAddr::new(ip, ent.service_port)));
|
||||
|
||||
+2
-2
@@ -215,7 +215,7 @@ pub fn gen_node_key(metadata_dir: &Path) -> Result<NodeKey, Error> {
|
||||
} else {
|
||||
if !metadata_dir.exists() {
|
||||
info!("Metadata directory does not exist, creating it.");
|
||||
std::fs::create_dir(&metadata_dir)?;
|
||||
std::fs::create_dir(metadata_dir)?;
|
||||
}
|
||||
|
||||
info!("Generating new node key pair.");
|
||||
@@ -419,7 +419,7 @@ impl System {
|
||||
.get(&n.id.into())
|
||||
.cloned()
|
||||
.map(|(_, st)| st)
|
||||
.unwrap_or(NodeStatus::unknown()),
|
||||
.unwrap_or_else(NodeStatus::unknown),
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
known_nodes
|
||||
|
||||
Reference in New Issue
Block a user