meta: make clippy happy

pull/153/head
Jake McGinty 2021-09-15 21:18:04 +09:00
parent cacd80b283
commit ae89e06655
1 changed files with 3 additions and 7 deletions

View File

@ -880,16 +880,12 @@ fn override_endpoint(
} else { } else {
None None
}; };
endpoint.map(|endpoint| EndpointContents::Set(endpoint)) endpoint.map(EndpointContents::Set)
}; };
if let Some(contents) = endpoint_contents { if let Some(contents) = endpoint_contents {
log::info!("Updating endpoint."); log::info!("Updating endpoint.");
Api::new(&config.server).http_form( Api::new(&config.server).http_form("PUT", "/user/endpoint", contents)?;
"PUT",
"/user/endpoint",
contents,
)?;
} else { } else {
log::info!("exiting without overriding endpoint."); log::info!("exiting without overriding endpoint.");
} }
@ -1048,7 +1044,7 @@ fn print_peer(peer: &PeerState, short: bool, level: usize) {
println_pad!(pad, " {}: {}", "ip".bold(), peer.ip); println_pad!(pad, " {}: {}", "ip".bold(), peer.ip);
if let Some(info) = info { if let Some(info) = info {
if let Some(endpoint) = info.config.endpoint { if let Some(endpoint) = info.config.endpoint {
println_pad!(pad, " {}: {}", "endpoint".bold(), endpoint ); println_pad!(pad, " {}: {}", "endpoint".bold(), endpoint);
} }
if let Some(last_handshake) = info.stats.last_handshake_time { if let Some(last_handshake) = info.stats.last_handshake_time {
let duration = last_handshake.elapsed().expect("horrible clock problem"); let duration = last_handshake.elapsed().expect("horrible clock problem");