Commit f127e242 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'untry-macros'

5f5ffbf3

 macros: remove a `try!()` usage for the `?` operator
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: Brad King's avatarBrad King <brad.king@kitware.com>
Merge-request: !71
parents cce72ac1 5f5ffbf3
......@@ -54,7 +54,7 @@ macro_rules! enum_serialize {
impl Deserialize for $name {
fn deserialize<D: Deserializer>(deserializer: &mut D) -> ::std::result::Result<Self, D::Error> {
let val = try!(String::deserialize(deserializer));
let val = String::deserialize(deserializer)?;
match val.as_str() {
$( $str => Ok($name::$value), )*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment