fix(clippy): enable more lints and fix issues
We also add some more metadata to the Cargo.toml manifest
This commit is contained in:
parent
846a0675d1
commit
639b5cf89f
2 changed files with 14 additions and 7 deletions
10
Cargo.toml
10
Cargo.toml
|
@ -5,6 +5,16 @@ description = "An HTTP server using HTTP basic auth to make secure calls to nsup
|
||||||
name = "webnsupdate"
|
name = "webnsupdate"
|
||||||
version = "0.3.2-dev"
|
version = "0.3.2-dev"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
license-file = "LICENSE"
|
||||||
|
readme = "README.md"
|
||||||
|
keywords = ["dns", "dyndns", "dynamic-ip"]
|
||||||
|
categories = ["networking", "dns", "dyndns"]
|
||||||
|
repository = "https://github.com/jalil-salame/webnsupdate"
|
||||||
|
|
||||||
|
[lints.clippy]
|
||||||
|
cargo = { level = "warn", priority = -2 }
|
||||||
|
multiple_crate_versions = "allow"
|
||||||
|
pedantic = { level = "warn", priority = -1 }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
axum = "0.7"
|
axum = "0.7"
|
||||||
|
|
11
src/main.rs
11
src/main.rs
|
@ -77,7 +77,7 @@ struct Opts {
|
||||||
|
|
||||||
/// Set client IP source
|
/// Set client IP source
|
||||||
///
|
///
|
||||||
/// see: https://docs.rs/axum-client-ip/latest/axum_client_ip/enum.SecureClientIpSource.html
|
/// see: <https://docs.rs/axum-client-ip/latest/axum_client_ip/enum.SecureClientIpSource.html>
|
||||||
#[clap(long, default_value = "RightmostXForwardedFor")]
|
#[clap(long, default_value = "RightmostXForwardedFor")]
|
||||||
ip_source: SecureClientIpSource,
|
ip_source: SecureClientIpSource,
|
||||||
|
|
||||||
|
@ -281,12 +281,9 @@ fn main() -> Result<()> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(None) => {
|
Ok(None) => info!("No previous IP address set"),
|
||||||
info!("No previous IP address set");
|
|
||||||
}
|
Err(err) => error!("Failed to load last ip address: {err}"),
|
||||||
Err(err) => {
|
|
||||||
error!("Failed to load last ip address: {err}")
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create services
|
// Create services
|
||||||
|
|
Loading…
Reference in a new issue