From 730f90845812b3085a5aa7c03a141a65fe3b2df1 Mon Sep 17 00:00:00 2001 From: Shannon Sterz Date: Thu, 6 Mar 2025 13:43:45 +0100 Subject: [PATCH] apt: ignore clippy lint about new having to return `Self` while this is a reasonable convention to follow, in this case the new function is part of a public trait and changing the signature would force all users to adapt. so ignore the lint for now [1]. [1]: https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self Signed-off-by: Shannon Sterz --- proxmox-apt/src/repositories/file.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/proxmox-apt/src/repositories/file.rs b/proxmox-apt/src/repositories/file.rs index e34e84e0..9f4beafd 100644 --- a/proxmox-apt/src/repositories/file.rs +++ b/proxmox-apt/src/repositories/file.rs @@ -30,6 +30,7 @@ pub trait APTRepositoryFileImpl { /// If the file is hidden, the path points to a directory, or the extension /// is usually ignored by APT (e.g. `.orig`), `Ok(None)` is returned, while /// invalid file names yield an error. + #[allow(clippy::new_ret_no_self)] fn new>(path: P) -> Result, APTRepositoryFileError>; fn with_content(content: String, content_type: APTRepositoryFileType) -> Self;