chore: clippy

This commit is contained in:
2021-07-16 01:03:24 +08:00
parent 4980d41db7
commit 854b8fb5de
2 changed files with 199 additions and 193 deletions

387
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -9,7 +9,6 @@ mod network;
// mod simple_thread_pool;
use std::env;
use std::thread;
use rust_util::XResult;
use acme_lib::Directory;
use acme_lib::{create_p384_key, create_p256_key, create_rsa_key};
@@ -117,7 +116,7 @@ async fn main() -> tide::Result<()> {
}
Ok(email) => {
if let Some(email_from_args) = matches.value_of("email") {
if &email != email_from_args {
if email != email_from_args {
warning!("Get email from account config: {}", email);
}
}
@@ -313,7 +312,7 @@ fn request_acme_certificate(acme_request: AcmeRequest) -> XResult<()> {
let ipv4 = opt_result!(resolve_first_ipv4(&resolver, domain), "{}");
match ipv4 {
None => return simple_error!("Resolve domain ip failed: {}", domain),
Some(ipv4) => if local_public_ip != &ipv4 {
Some(ipv4) => if local_public_ip != ipv4 {
return simple_error!("Check domain ip: {}, mis-match, local: {} vs domain: {}", domain, local_public_ip, ipv4);
}
}