From 1e10f45bb97e154860ffe1c29113939dbfa3e35c Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 31 Oct 2026 10:12:30 -0700 Subject: [PATCH] refactor(config): StaticConfig::read takes &Path, not &PathBuf clippy::ptr_arg: the function only opens the file, so any path will do, and every caller that passes a &PathBuf still compiles through deref. Needed so the macOS StaticConfigExt methods can take &Path (next revision). Verified: fast-check native, Windows clippy -D warnings, KDE check and lib tests, macOS fake-CC type-check PASS. Verified on the Mini: not yet. --- crates/komorebi-config/src/static_config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/komorebi-config/src/static_config.rs b/crates/komorebi-config/src/static_config.rs index b08e339f..109e040f 100644 --- a/crates/komorebi-config/src/static_config.rs +++ b/crates/komorebi-config/src/static_config.rs @@ -617,7 +617,7 @@ impl StaticConfig { /// # Errors /// /// The file cannot be read, or it is not a configuration. - pub fn read(path: &PathBuf) -> color_eyre::Result { + pub fn read(path: &std::path::Path) -> color_eyre::Result { let content = std::fs::read_to_string(path)?; serde_json::from_str(&content).map_err(Into::into) }