mirror of
https://github.com/ndarilek/tts-rs.git
synced 2024-11-22 22:59:37 +00:00
Eliminate some Clippy warnings.
This commit is contained in:
parent
ace5d2fd1f
commit
dbac8a3fe0
|
@ -56,8 +56,8 @@ impl WinRT {
|
|||
let mut rv = Self {
|
||||
id: bid,
|
||||
synth: SpeechSynthesizer::new()?,
|
||||
player: player,
|
||||
playback_list: playback_list,
|
||||
player,
|
||||
playback_list,
|
||||
};
|
||||
*backend_id += 1;
|
||||
Self::init_callbacks(&mut rv)?;
|
||||
|
|
|
@ -190,8 +190,7 @@ impl TTS {
|
|||
#[cfg(any(target_os = "macos", target_os = "ios"))]
|
||||
Backends::AvFoundation => Ok(TTS(Box::new(backends::AvFoundation::new()))),
|
||||
};
|
||||
if backend.is_ok() {
|
||||
let backend = backend.unwrap();
|
||||
if let Ok(backend) = backend {
|
||||
if let Some(id) = backend.0.id() {
|
||||
let mut callbacks = CALLBACKS.lock().unwrap();
|
||||
callbacks.insert(id, Callbacks::default());
|
||||
|
@ -206,7 +205,7 @@ impl TTS {
|
|||
#[cfg(target_os = "linux")]
|
||||
let tts = TTS::new(Backends::SpeechDispatcher);
|
||||
#[cfg(windows)]
|
||||
let tts = if let Some(tts) = TTS::new(Backends::Tolk).ok() {
|
||||
let tts = if let Ok(tts) = TTS::new(Backends::Tolk) {
|
||||
Ok(tts)
|
||||
} else {
|
||||
TTS::new(Backends::WinRT)
|
||||
|
|
Loading…
Reference in New Issue
Block a user