Skip to content

Commit

Permalink
Merge pull request #1 from steveklabnik/master
Browse files Browse the repository at this point in the history
fail -> panic
  • Loading branch information
mgax committed Oct 31, 2014
2 parents 9aedbe3 + f02cad7 commit 5003bd9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
});
}
Expand Down Expand Up @@ -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") }
}
}

Expand Down

0 comments on commit 5003bd9

Please sign in to comment.