mirror of https://github.com/ndarilek/tts-rs.git
Clean up `println!` and comparison calls.
This commit is contained in:
parent
427ca027be
commit
7eccb9f573
|
@ -51,16 +51,10 @@ impl Backend for NSSpeechSynthesizerBackend {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn speak(&mut self, text: &str, interrupt: bool) -> Result<(), Error> {
|
fn speak(&mut self, text: &str, interrupt: bool) -> Result<(), Error> {
|
||||||
println!("speak({}, {})", text, interrupt);
|
trace!("speak({}, {})", text, interrupt);
|
||||||
let str = unsafe { NSString::alloc(nil).init_str(text) };
|
let str = unsafe { NSString::alloc(nil).init_str(text) };
|
||||||
let success: BOOL = unsafe { msg_send![self.0, startSpeakingString: str] };
|
let _: BOOL = unsafe { msg_send![self.0, startSpeakingString: str] };
|
||||||
println!("Comparing");
|
Ok(())
|
||||||
if success == NO {
|
|
||||||
println!("Failed");
|
|
||||||
Ok(())
|
|
||||||
} else {
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn stop(&mut self) -> Result<(), Error> {
|
fn stop(&mut self) -> Result<(), Error> {
|
||||||
|
|
Loading…
Reference in New Issue