+1
-1
@@ -25,7 +25,7 @@ impl CFIndexConvertible for uint {
|
||||
fn to_CFIndex(self) -> CFIndex {
|
||||
let max_CFIndex: CFIndex = Bounded::max_value();
|
||||
if self > (max_CFIndex as uint) {
|
||||
fail!("value out of range")
|
||||
panic!("value out of range")
|
||||
}
|
||||
self as CFIndex
|
||||
}
|
||||
|
||||
+2
-2
@@ -49,7 +49,7 @@ pub type CFDictionaryRef = *const __CFDictionary;
|
||||
|
||||
/// An immutable dictionary of key-value pairs.
|
||||
///
|
||||
/// FIXME(pcwalton): Should be a newtype struct, but that fails due to a Rust compiler bug.
|
||||
/// FIXME(pcwalton): Should be a newtype struct, but that panics due to a Rust compiler bug.
|
||||
pub struct CFDictionary {
|
||||
obj: CFDictionaryRef,
|
||||
}
|
||||
@@ -147,7 +147,7 @@ impl CFDictionary {
|
||||
pub fn get(&self, key: *const c_void) -> *const c_void {
|
||||
let value = self.find(key);
|
||||
if value.is_none() {
|
||||
fail!("No entry found for key: {}", key);
|
||||
panic!("No entry found for key: {}", key);
|
||||
}
|
||||
value.unwrap()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user