File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -475,15 +475,14 @@ impl<'a> Encoder<'a> {
475475}
476476
477477macro_rules! emit_enquoted_if_mapkey {
478- ( $enc: ident, $e: expr) => {
478+ ( $enc: ident, $e: expr) => ( {
479479 if $enc. is_emitting_map_key {
480- try!( write!( $enc. writer, "\" {}\" " , $e) ) ;
481- Ok ( ( ) )
480+ write!( $enc. writer, "\" {}\" " , $e) ?;
482481 } else {
483- try!( write!( $enc. writer, "{}" , $e) ) ;
484- Ok ( ( ) )
482+ write!( $enc. writer, "{}" , $e) ?;
485483 }
486- }
484+ Ok ( ( ) )
485+ } )
487486}
488487
489488impl < ' a > :: Encoder for Encoder < ' a > {
Original file line number Diff line number Diff line change @@ -511,10 +511,10 @@ macro_rules! tuple {
511511 let len: usize = count_idents!( $( $name, ) * ) ;
512512 d. read_tuple( len, |d| {
513513 let mut i = 0 ;
514- let ret = ( $( try! ( d. read_tuple_arg( { i+=1 ; i-1 } ,
515- |d| -> Result <$name, D :: Error > {
514+ let ret = ( $( d. read_tuple_arg( { i+=1 ; i-1 } ,
515+ |d| -> Result <$name, D :: Error > {
516516 Decodable :: decode( d)
517- } ) ) , ) * ) ;
517+ } ) ? , ) * ) ;
518518 Ok ( ret)
519519 } )
520520 }
@@ -527,7 +527,7 @@ macro_rules! tuple {
527527 $( let $name = $name; n += 1 ; ) *
528528 s. emit_tuple( n, |s| {
529529 let mut i = 0 ;
530- $( try! ( s. emit_tuple_arg( { i+=1 ; i-1 } , |s| $name. encode( s) ) ) ; ) *
530+ $( s. emit_tuple_arg( { i+=1 ; i-1 } , |s| $name. encode( s) ) ? ; ) *
531531 Ok ( ( ) )
532532 } )
533533 }
You can’t perform that action at this time.
0 commit comments