Skip to content

Commit

Permalink
Fix various minor lints
Browse files Browse the repository at this point in the history
- Fix an unused variable in ostree-ext
- Fix other clippy lints

Signed-off-by: Colin Walters <[email protected]>
  • Loading branch information
cgwalters committed Nov 18, 2024
1 parent fde4cca commit 0adf1d4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/src/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ pub(crate) async fn rollback(sysroot: &Storage) -> Result<()> {
("MESSAGE_ID", ROLLBACK_JOURNAL_ID),
(
"BOOTC_MANIFEST_DIGEST",
&rollback_image.manifest_digest.to_string(),
rollback_image.manifest_digest.as_ref(),
),
]
.into_iter(),
Expand Down
2 changes: 1 addition & 1 deletion lib/src/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ fn human_render_imagestatus(
} else {
writeln!(out, "{version}")?;
}
} else if let Some(timestamp) = timestamp.as_deref() {
} else if let Some(timestamp) = timestamp {
// Otherwise just output timestamp
write_row_name(&mut out, "Timestamp", prefix_len)?;
writeln!(out, "{timestamp}")?;
Expand Down
2 changes: 1 addition & 1 deletion ostree-ext/src/container/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ fn ref_for_blob_digest(d: &str) -> Result<String> {

/// Convert e.g. sha256:12345... into `/ostree/container/blob/sha256_2B12345...`.
fn ref_for_layer(l: &oci_image::Descriptor) -> Result<String> {
ref_for_blob_digest(&l.digest().to_string())
ref_for_blob_digest(&l.digest().as_ref())
}

/// Convert e.g. sha256:12345... into `/ostree/container/blob/sha256_2B12345...`.
Expand Down
2 changes: 1 addition & 1 deletion ostree-ext/tests/it/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ async fn test_container_etc_hardlinked(absolute: bool) -> Result<()> {
#[tokio::test]
async fn test_non_ostree() -> Result<()> {
let fixture = NonOstreeFixture::new_base()?;
let (src_imgref, src_digest) = fixture.export_container().await?;
let src_digest = fixture.export_container().await?.1;

let imgref = fixture.export_container().await.unwrap().0;
let imp = fixture.must_import(&imgref).await?;
Expand Down

0 comments on commit 0adf1d4

Please sign in to comment.