Clean up `println!` and comparison calls.

This commit is contained in:
Nolan Darilek 2020-08-12 09:54:25 -05:00
parent 427ca027be
commit 7eccb9f573
1 changed files with 3 additions and 9 deletions

View File

@ -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> {