diff --git a/src/base.rs b/src/base.rs index b7e5546..83b020b 100644 --- a/src/base.rs +++ b/src/base.rs @@ -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 } diff --git a/src/dictionary.rs b/src/dictionary.rs index 104d67b..a4b3176 100644 --- a/src/dictionary.rs +++ b/src/dictionary.rs @@ -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() }