diff --git a/src/backends/qemu/mod.rs b/src/backends/qemu/mod.rs
index 13f3ba9a..6d9f73e9 100644
--- a/src/backends/qemu/mod.rs
+++ b/src/backends/qemu/mod.rs
@@ -82,7 +82,7 @@ impl QemuConfig {
/// Read `
/qemu.json` if present, otherwise return the
/// built-in defaults.
pub fn from_dir(dir: &Path) -> Result {
- let path = Path::new(&dir.join("qemu.json"));
+ let path = dir.join("qemu.json");
config::load_config_or_default(&path)
}
}
diff --git a/src/engines/threshold.rs b/src/engines/threshold.rs
index dc5a51ad..8b0f9c7e 100644
--- a/src/engines/threshold.rs
+++ b/src/engines/threshold.rs
@@ -408,7 +408,7 @@ impl ThresholdEngine {
/// Load `threshold.json`, falling back to built-in defaults when absent.
pub fn from_config_dir(dir: &Path) -> Result {
- let path = Path::new(&dir.join(format!("{ENGINE_NAME}.json")));
+ let path = dir.join(format!("{ENGINE_NAME}.json"));
let cfg: ThresholdConfig = config::load_config_or_default(&path)?;
cfg.validate()?;
Ok(Self::new(cfg))