Skip to content

Commit 2f40a53

Browse files
committed
Added a BOOL type.
1 parent 65e5bb8 commit 2f40a53

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

object.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use objc::runtime::Class;
1+
use objc::runtime::{BOOL, Class, NO};
22
use objc::{EncodePtr, Id, Message, ShareId};
33

44
use NSString;
@@ -19,10 +19,10 @@ pub trait INSObject : 'static + Sized + Message + EncodePtr {
1919
}
2020

2121
fn is_equal<T>(&self, other: &T) -> bool where T: INSObject {
22-
let result: i8 = unsafe {
22+
let result: BOOL = unsafe {
2323
msg_send![self, isEqual:other]
2424
};
25-
result != 0
25+
result != NO
2626
}
2727

2828
fn description(&self) -> ShareId<NSString> {
@@ -33,10 +33,10 @@ pub trait INSObject : 'static + Sized + Message + EncodePtr {
3333
}
3434

3535
fn is_kind_of(&self, cls: &Class) -> bool {
36-
let result: i8 = unsafe {
36+
let result: BOOL = unsafe {
3737
msg_send![self, isKindOfClass:cls]
3838
};
39-
result != 0
39+
result != NO
4040
}
4141

4242
fn new() -> Id<Self> {

0 commit comments

Comments
 (0)