Merge pull request #44 from TyOverby/fail_panic

fail! -> panic!
This commit is contained in:
Jack Moffitt
2014-11-04 12:19:39 -07:00
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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
View File
@@ -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()
}