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.
This commit is contained in:
LGUG2Z committed 2026-10-31 12:36:14 -07:00
1 parent ec0d3923e5
commit 1e10f45bb9
1 file changed
+1 -1
+1 -1
View File
@@ -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<Self> {
pub fn read(path: &std::path::Path) -> color_eyre::Result<Self> {
let content = std::fs::read_to_string(path)?;
serde_json::from_str(&content).map_err(Into::into)
}