From 3c9ef860374e001de91b099780dd353cdb1b125f Mon Sep 17 00:00:00 2001 From: Ty Overby Date: Tue, 4 Nov 2014 11:16:39 -0800 Subject: [PATCH] fail -> panic --- src/base.rs | 2 +- src/dictionary.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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() }