Skip to content

Commit 151e870

Browse files
authored
Merge pull request #906 from cgwalters/minor-lints
Fix various minor lints
2 parents 848be3f + 0adf1d4 commit 151e870

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

lib/src/deploy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ pub(crate) async fn rollback(sysroot: &Storage) -> Result<()> {
508508
("MESSAGE_ID", ROLLBACK_JOURNAL_ID),
509509
(
510510
"BOOTC_MANIFEST_DIGEST",
511-
&rollback_image.manifest_digest.to_string(),
511+
rollback_image.manifest_digest.as_ref(),
512512
),
513513
]
514514
.into_iter(),

lib/src/status.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ fn human_render_imagestatus(
389389
} else {
390390
writeln!(out, "{version}")?;
391391
}
392-
} else if let Some(timestamp) = timestamp.as_deref() {
392+
} else if let Some(timestamp) = timestamp {
393393
// Otherwise just output timestamp
394394
write_row_name(&mut out, "Timestamp", prefix_len)?;
395395
writeln!(out, "{timestamp}")?;

ostree-ext/src/container/store.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ fn ref_for_blob_digest(d: &str) -> Result<String> {
6868

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

7474
/// Convert e.g. sha256:12345... into `/ostree/container/blob/sha256_2B12345...`.

ostree-ext/tests/it/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,7 @@ async fn test_container_etc_hardlinked(absolute: bool) -> Result<()> {
12561256
#[tokio::test]
12571257
async fn test_non_ostree() -> Result<()> {
12581258
let fixture = NonOstreeFixture::new_base()?;
1259-
let (src_imgref, src_digest) = fixture.export_container().await?;
1259+
let src_digest = fixture.export_container().await?.1;
12601260

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

0 commit comments

Comments
 (0)