Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix new clippy warnings #112

Merged
merged 1 commit into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nginx-sys/build/vendored.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ fn make_cache_dir() -> Result<PathBuf, Box<dyn StdError>> {
fn download(cache_dir: &Path, url: &str) -> Result<PathBuf, Box<dyn StdError>> {
fn proceed_with_download(file_path: &Path) -> bool {
// File does not exist or is zero bytes
!file_path.exists() || file_path.metadata().map_or(false, |m| m.len() < 1)
!file_path.exists() || file_path.metadata().is_ok_and(|m| m.len() < 1)
}
let filename = url.split('/').last().unwrap();
let file_path = cache_dir.join(filename);
Expand Down Expand Up @@ -544,7 +544,7 @@ fn compile_nginx(cache_dir: &Path) -> Result<(PathBuf, PathBuf), Box<dyn StdErro
let build_info_path = nginx_src_dir.join("last-build-info");
let current_build_info = build_info(&nginx_configure_flags);
let build_info_no_change = if build_info_path.exists() {
read_to_string(&build_info_path).map_or(false, |s| s == current_build_info)
read_to_string(&build_info_path).is_ok_and(|s| s == current_build_info)
} else {
false
};
Expand Down Expand Up @@ -599,7 +599,7 @@ fn nginx_configure_flags(
modules
};
let mut nginx_opts = vec![format_source_path("--prefix", nginx_install_dir)];
if env::var("NGX_DEBUG").map_or(false, |s| s == "true") {
if env::var("NGX_DEBUG").is_ok_and(|s| s == "true") {
println!("Enabling --with-debug");
nginx_opts.push("--with-debug".to_string());
}
Expand Down
4 changes: 2 additions & 2 deletions src/http/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ impl<'a> PartialEq<&'a Method> for Method {
}
}

impl<'a> PartialEq<Method> for &'a Method {
impl PartialEq<Method> for &Method {
#[inline]
fn eq(&self, other: &Method) -> bool {
*self == other
Expand Down Expand Up @@ -641,7 +641,7 @@ impl<'a> PartialEq<&'a str> for Method {
}
}

impl<'a> PartialEq<Method> for &'a str {
impl PartialEq<Method> for &str {
#[inline]
fn eq(&self, other: &Method) -> bool {
*self == other.as_ref()
Expand Down
Loading