fail -> panic

This commit is contained in:
Steve Klabnik 2014-10-30 00:23:09 -04:00
parent c8967119af
commit 59892f1511
1 changed files with 2 additions and 2 deletions

View File

@ -54,9 +54,9 @@ impl<T:fmt::Show> LocalResult<T> {
/// Returns the single unique conversion result, or fails accordingly.
pub fn unwrap(self) -> T {
match self {
NoResult => fail!("No such local time"),
NoResult => panic!("No such local time"),
Single(t) => t,
Ambiguous(t1,t2) => fail!("Ambiguous local time, ranging from {} to {}", t1, t2),
Ambiguous(t1,t2) => panic!("Ambiguous local time, ranging from {} to {}", t1, t2),
}
}
}