fix(clippy): enable more lints and fix issues
Some checks failed
/ build (push) Successful in 7s
/ check (push) Failing after 30s

We also add some more metadata to the Cargo.toml manifest
This commit is contained in:
Jalil David Salamé Messina 2024-11-23 20:58:40 +01:00
parent 846a0675d1
commit 639b5cf89f
Signed by: jalil
GPG key ID: F016B9E770737A0B
2 changed files with 14 additions and 7 deletions

View file

@ -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"

View file

@ -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