1
0
mirror of https://github.com/ndarilek/tts-rs.git synced 2024-11-17 15:39:38 +00:00

Eliminate some warnings.

This commit is contained in:
Nolan Darilek 2023-09-09 12:43:43 -05:00
parent 8dabcc99c4
commit 9fb8107acf

View File

@ -571,7 +571,7 @@ impl Tts {
if utterance_callbacks { if utterance_callbacks {
let mut callbacks = CALLBACKS.lock().unwrap(); let mut callbacks = CALLBACKS.lock().unwrap();
let id = self.0.read().unwrap().id().unwrap(); let id = self.0.read().unwrap().id().unwrap();
let mut callbacks = callbacks.get_mut(&id).unwrap(); let callbacks = callbacks.get_mut(&id).unwrap();
callbacks.utterance_begin = callback; callbacks.utterance_begin = callback;
Ok(()) Ok(())
} else { } else {
@ -591,7 +591,7 @@ impl Tts {
if utterance_callbacks { if utterance_callbacks {
let mut callbacks = CALLBACKS.lock().unwrap(); let mut callbacks = CALLBACKS.lock().unwrap();
let id = self.0.read().unwrap().id().unwrap(); let id = self.0.read().unwrap().id().unwrap();
let mut callbacks = callbacks.get_mut(&id).unwrap(); let callbacks = callbacks.get_mut(&id).unwrap();
callbacks.utterance_end = callback; callbacks.utterance_end = callback;
Ok(()) Ok(())
} else { } else {
@ -611,7 +611,7 @@ impl Tts {
if utterance_callbacks { if utterance_callbacks {
let mut callbacks = CALLBACKS.lock().unwrap(); let mut callbacks = CALLBACKS.lock().unwrap();
let id = self.0.read().unwrap().id().unwrap(); let id = self.0.read().unwrap().id().unwrap();
let mut callbacks = callbacks.get_mut(&id).unwrap(); let callbacks = callbacks.get_mut(&id).unwrap();
callbacks.utterance_stop = callback; callbacks.utterance_stop = callback;
Ok(()) Ok(())
} else { } else {