From c152fb3cfa6392ded20669a285db52474e2020fd Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Fri, 30 Jan 2026 14:43:42 -0500 Subject: [PATCH] fix(cli): compare PathBuf with Path instead of String To improve compatibility with older rustc versions, don't assume we can compare PathBufs with Strings. Fixes #36. Signed-off-by: Aaron Jacobs --- crates/whis-cli/src/commands/setup/local.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/whis-cli/src/commands/setup/local.rs b/crates/whis-cli/src/commands/setup/local.rs index f215b95..86aaf2a 100644 --- a/crates/whis-cli/src/commands/setup/local.rs +++ b/crates/whis-cli/src/commands/setup/local.rs @@ -11,6 +11,8 @@ //! 3. Download model if not present //! 4. Save to settings +use std::path::Path; + use anyhow::Result; use whis_core::{Settings, TranscriptionProvider, model}; @@ -80,7 +82,7 @@ pub fn setup_transcription_local() -> Result<()> { ParakeetModel .models() .iter() - .find(|m| ParakeetModel.default_path(m.name) == *p) + .find(|m| ParakeetModel.default_path(m.name) == Path::new(p)) .map(|m| m.name) }); @@ -139,7 +141,7 @@ pub fn setup_transcription_local() -> Result<()> { WhisperModel .models() .iter() - .find(|m| WhisperModel.default_path(m.name) == *p) + .find(|m| WhisperModel.default_path(m.name) == Path::new(p)) .map(|m| m.name) });