Skip to content

Commit b305a05

Browse files
committed
lint: Add missing format!
This got missed when converting the errors. Signed-off-by: Colin Walters <[email protected]>
1 parent 5309d5b commit b305a05

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/src/lints.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,12 +380,13 @@ fn check_baseimage_root_norecurse(dir: &Dir) -> LintResult {
380380
let link = dir.read_link_contents("ostree")?;
381381
let expected = "sysroot/ostree";
382382
if link.as_os_str().as_bytes() != expected.as_bytes() {
383-
return lint_err("Expected /ostree -> {expected}, not {link:?}");
383+
return lint_err(format!("Expected /ostree -> {expected}, not {link:?}"));
384384
}
385385

386386
let config = ostree_prepareroot::require_config_from_root(dir)?;
387387
if !ostree_prepareroot::overlayfs_enabled_in_config(&config)? {
388-
return lint_err("{prepareroot_path} does not have composefs enabled");
388+
let path = ostree_ext::ostree_prepareroot::CONF_PATH;
389+
return lint_err(format!("{path} does not have composefs enabled"));
389390
}
390391

391392
lint_ok()

ostree-ext/src/ostree_prepareroot.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ use crate::keyfileext::KeyFileExt;
1818
use crate::ostree_manual;
1919
use crate::utils::ResultExt;
2020

21-
pub(crate) const CONF_PATH: &str = "ostree/prepare-root.conf";
21+
/// The relative path to ostree-prepare-root's config.
22+
pub const CONF_PATH: &str = "ostree/prepare-root.conf";
2223

2324
pub(crate) fn load_config(root: &ostree::RepoFile) -> Result<Option<glib::KeyFile>> {
2425
let cancellable = gio::Cancellable::NONE;

0 commit comments

Comments
 (0)