Less awkward order of things

This commit is contained in:
Oskar Thornblad 2021-01-27 22:31:43 +01:00
parent 66f7483112
commit 269ff90209
1 changed files with 5 additions and 6 deletions

View File

@ -197,15 +197,14 @@ impl Backend for AppKit {
}
fn is_speaking(&self) -> Result<bool, Error> {
#[cfg(not(target_arch = "aarch64"))]
let yes: i8 = YES;
let result: i8 = unsafe { msg_send![self.0, isSpeaking] };
#[cfg(target_arch = "aarch64")]
let yes: i8 = match YES { true => 1, false => 0 };
let is_speaking = result == YES as i8;
#[cfg(not(target_arch = "aarch64"))]
let is_speaking = result == YES;
let is_speaking: i8 = unsafe { msg_send![self.0, isSpeaking] };
Ok(is_speaking == yes)
Ok(is_speaking)
}
}