From f02cad75eec6c68329f70b09848d238070f7a1b8 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Thu, 30 Oct 2014 00:23:31 -0400 Subject: [PATCH] fail -> panic --- src/vector.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vector.rs b/src/vector.rs index a97a9b15..f9fc9e96 100644 --- a/src/vector.rs +++ b/src/vector.rs @@ -190,7 +190,7 @@ impl<'a> Feature<'a> { let rv = OGR_F_GetFieldAsDouble(self.c_feature, field_id); return Some(RealValue(rv as f64)); }, - _ => fail!("Unknown field type {}", field_type) + _ => panic!("Unknown field type {}", field_type) } }); } @@ -248,11 +248,11 @@ pub enum FieldValue { impl FieldValue { pub fn as_string(self) -> String { - match self { StringValue(rv) => rv, _ => fail!("not a StringValue") } + match self { StringValue(rv) => rv, _ => panic!("not a StringValue") } } pub fn as_real(self) -> f64 { - match self { RealValue(rv) => rv, _ => fail!("not a RealValue") } + match self { RealValue(rv) => rv, _ => panic!("not a RealValue") } } }