From e00568e80190a7c7df3042790809d7a281bf772a Mon Sep 17 00:00:00 2001 From: Zero Date: Fri, 5 May 2023 22:47:46 -0600 Subject: [PATCH] reword error message in example and remove is_file check --- examples/full_usage/src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/full_usage/src/main.rs b/examples/full_usage/src/main.rs index 3c544e0..f0ab500 100644 --- a/examples/full_usage/src/main.rs +++ b/examples/full_usage/src/main.rs @@ -31,15 +31,15 @@ fn main() { .nth(1) .expect("first argument should be path to WAV file"); let audio_path = Path::new(&arg1); - if !audio_path.exists() && !audio_path.is_file() { - panic!("expected a file"); + if !audio_path.exists() { + panic!("audio file doesn't exist"); } let arg2 = std::env::args() .nth(2) .expect("second argument should be path to Whisper model"); let whisper_path = Path::new(&arg2); - if !whisper_path.exists() && !whisper_path.is_file() { - panic!("expected a whisper directory") + if !whisper_path.exists() { + panic!("whisper file doesn't exist") } let original_samples = parse_wav_file(audio_path);