diff --git a/dictionary.rs b/dictionary.rs index a0b98af..bbe8fa8 100644 --- a/dictionary.rs +++ b/dictionary.rs @@ -127,7 +127,7 @@ impl(key.as_type_ref())) - as bool + != 0 } } @@ -138,7 +138,7 @@ impl(key.as_type_ref()), - cast::transmute::<&*c_void, **c_void>(&value)) as bool; + cast::transmute::<&*c_void, **c_void>(&value)) != 0; // FIXME: this will not handle non-CF dictionary entries // or ptr::null() values correctly. diff --git a/number.rs b/number.rs index 1d2ad67..f07dba3 100644 --- a/number.rs +++ b/number.rs @@ -150,7 +150,7 @@ impl CFNumber { #[fixed_stack_segment] fn has_float_type(&self) -> bool { unsafe { - CFNumberIsFloatType(self.contents.obj) as bool + CFNumberIsFloatType(self.contents.obj) != 0 } }