Skip to content

Commit

Permalink
Fix Linux and Windows builds
Browse files Browse the repository at this point in the history
  • Loading branch information
helgoboss committed Nov 2, 2022
1 parent 36de5e6 commit cee5796
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions main/src/domain/reaper_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use std::collections::HashSet;
use std::convert::TryInto;
use std::error::Error;
use std::fmt::{Display, Formatter};
use std::sync::Mutex;
use std::time::{Duration, Instant};

#[derive(Clone, Eq, PartialEq, Debug)]
Expand Down Expand Up @@ -59,11 +58,11 @@ pub fn say(feedback_value: SpeechSourceFeedbackValue) -> Result<(), Box<dyn Erro
}
#[cfg(target_os = "windows")]
{
Tts::default()
tts::Tts::default()
}
}

use once_cell::sync::Lazy;
use std::sync::Mutex;
static TTS: Lazy<Result<Mutex<tts::Tts>, tts::Error>> =
Lazy::new(|| get_default_tts().map(Mutex::new));
let tts = TTS.as_ref()?;
Expand All @@ -76,7 +75,7 @@ pub fn say(feedback_value: SpeechSourceFeedbackValue) -> Result<(), Box<dyn Erro
#[cfg(target_os = "linux")]
{
let _ = feedback_value;
Err("not yet supported on Linux")
Err("not yet supported on Linux".into())
}
}

Expand Down

0 comments on commit cee5796

Please sign in to comment.