Skip to content

Commit 5bedc52

Browse files
committed
Fix (or allow) remaining clippy lints
Signed-off-by: Colin Walters <[email protected]>
1 parent 9bc7fe9 commit 5bedc52

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

crates/lib/src/deploy.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ fn prefix_of_progress(p: &ImportProgress) -> &'static str {
139139
}
140140

141141
/// Write container fetch progress to standard output.
142+
#[allow(clippy::too_many_arguments)]
142143
async fn handle_layer_progress_print(
143144
mut layers: tokio::sync::mpsc::Receiver<ostree_container::store::ImportProgress>,
144145
mut layer_bytes: tokio::sync::watch::Receiver<Option<ostree_container::store::LayerProgress>>,
@@ -331,6 +332,7 @@ pub(crate) struct PreparedImportMeta {
331332
pub bytes_total: u64,
332333
}
333334

335+
#[allow(clippy::large_enum_variant)]
334336
pub(crate) enum PreparedPullResult {
335337
Ready(PreparedImportMeta),
336338
AlreadyPresent(Box<ImageState>),

crates/lib/src/spec.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,8 @@ fn canonicalize_reference(reference: Reference) -> Option<Reference> {
9898
reference.tag()?;
9999

100100
// No digest? Also pass through.
101-
let Some(digest) = reference.digest() else {
102-
return None;
103-
};
104-
101+
let digest = reference.digest()?;
102+
// Otherwise, replace with the digest
105103
Some(reference.clone_with_digest(digest.to_owned()))
106104
}
107105

crates/tmpfiles/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ pub fn var_to_tmpfiles<U: uzers::Users, G: uzers::Groups>(
315315
/// This proceeds depth-first and progressively deletes translated subpaths as it goes.
316316
/// `prefix` is updated at each recursive step, so that in case of errors it can be
317317
/// used to pinpoint the faulty path.
318+
#[allow(clippy::too_many_arguments)]
318319
fn convert_path_to_tmpfiles_d_recurse<U: uzers::Users, G: uzers::Groups>(
319320
out_entries: &mut BTreeSet<String>,
320321
out_unsupported: &mut Vec<PathBuf>,

0 commit comments

Comments
 (0)