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 <s.sterz@proxmox.com>
This commit is contained in:
Shannon Sterz 2025-03-06 13:43:45 +01:00 committed by Wolfgang Bumiller
parent 8fc324ee73
commit 730f908458

View File

@ -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<P: AsRef<Path>>(path: P) -> Result<Option<APTRepositoryFile>, APTRepositoryFileError>;
fn with_content(content: String, content_type: APTRepositoryFileType) -> Self;