Skip to content

Commit 3f11c4f

Browse files
committed
status: Minor code refactorings
- Rename variable to `slot_name` as I think it's a bit clearer Signed-off-by: Colin Walters <[email protected]>
1 parent 21c7b3c commit 3f11c4f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/src/status.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ pub(crate) async fn status(opts: super::cli::StatusOpts) -> Result<()> {
326326
}
327327

328328
fn human_readable_output(mut out: impl Write, host: &Host) -> Result<()> {
329-
for (status_string, status) in [
329+
for (slot_name, status) in [
330330
("staged", &host.status.staged),
331331
("booted", &host.status.booted),
332332
("rollback", &host.status.rollback),
@@ -342,7 +342,7 @@ fn human_readable_output(mut out: impl Write, host: &Host) -> Result<()> {
342342
// But for non-registry we include the transport
343343
Cow::Owned(format!("{transport}:{imagename}"))
344344
};
345-
writeln!(out, "Current {status_string} image: {imageref}")?;
345+
writeln!(out, "Current {slot_name} image: {imageref}")?;
346346

347347
let version = image
348348
.version
@@ -358,10 +358,10 @@ fn human_readable_output(mut out: impl Write, host: &Host) -> Result<()> {
358358
writeln!(out, " Image version: {version} ({timestamp})")?;
359359
writeln!(out, " Image digest: {digest}")?;
360360
} else {
361-
writeln!(out, "Current {status_string} state is native ostree")?;
361+
writeln!(out, "Current {slot_name} state is native ostree")?;
362362
}
363363
} else {
364-
writeln!(out, "No {status_string} image present")?;
364+
writeln!(out, "No {slot_name} image present")?;
365365
}
366366
}
367367
Ok(())

0 commit comments

Comments
 (0)