From 0a971feb087b0a7695458ce37dc7cce74b77b0b7 Mon Sep 17 00:00:00 2001 From: Nugine Date: Sun, 21 Jul 2024 11:14:32 +0800 Subject: [PATCH] fix lints: clippy::unnecessary_min_or_max --- src/unix.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/unix.rs b/src/unix.rs index 0081a00..b205dca 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -18,6 +18,7 @@ fn check_supported(resource: Resource) -> io::Result<()> { /// Set resource limits. /// # Errors /// \[Linux\] See +#[allow(clippy::unnecessary_min_or_max)] #[inline] pub fn setrlimit(resource: Resource, soft: u64, hard: u64) -> io::Result<()> { check_supported(resource)?; @@ -37,6 +38,7 @@ pub fn setrlimit(resource: Resource, soft: u64, hard: u64) -> io::Result<()> { /// Get resource limits. /// # Errors /// \[Linux\] See +#[allow(clippy::unnecessary_min_or_max)] #[inline] pub fn getrlimit(resource: Resource) -> io::Result<(u64, u64)> { check_supported(resource)?; @@ -63,6 +65,7 @@ pub type pid_t = i32; /// Set and get the resource limits of an arbitrary process. /// # Errors /// See +#[allow(clippy::unnecessary_min_or_max)] #[inline] #[cfg_attr(docsrs, doc(cfg(any(target_os = "linux", target_os = "android"))))] #[cfg(any(doc, rlimit__has_prlimit64))]