File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1055,8 +1055,8 @@ pub mod writer {
1055
1055
self . end_tag ( )
1056
1056
}
1057
1057
1058
- fn emit_map_elt_key < F > ( & mut self , _idx : uint , mut f : F ) -> EncodeResult where
1059
- F : FnMut ( & mut Encoder < ' a , W > ) -> EncodeResult ,
1058
+ fn emit_map_elt_key < F > ( & mut self , _idx : uint , f : F ) -> EncodeResult where
1059
+ F : FnOnce ( & mut Encoder < ' a , W > ) -> EncodeResult ,
1060
1060
{
1061
1061
1062
1062
try!( self . start_tag ( EsMapKey as uint ) ) ;
Original file line number Diff line number Diff line change @@ -635,8 +635,8 @@ impl<'a> ::Encoder<io::IoError> for Encoder<'a> {
635
635
write ! ( self . writer, "}}" )
636
636
}
637
637
638
- fn emit_map_elt_key < F > ( & mut self , idx : uint , mut f : F ) -> EncodeResult where
639
- F : FnMut ( & mut Encoder < ' a > ) -> EncodeResult ,
638
+ fn emit_map_elt_key < F > ( & mut self , idx : uint , f : F ) -> EncodeResult where
639
+ F : FnOnce ( & mut Encoder < ' a > ) -> EncodeResult ,
640
640
{
641
641
if idx != 0 { try!( write ! ( self . writer, "," ) ) }
642
642
self . emitting_map_key = EmittingMapKeyState :: Emitting ;
@@ -901,8 +901,8 @@ impl<'a> ::Encoder<io::IoError> for PrettyEncoder<'a> {
901
901
}
902
902
}
903
903
904
- fn emit_map_elt_key < F > ( & mut self , idx : uint , mut f : F ) -> EncodeResult where
905
- F : FnMut ( & mut PrettyEncoder < ' a > ) -> EncodeResult ,
904
+ fn emit_map_elt_key < F > ( & mut self , idx : uint , f : F ) -> EncodeResult where
905
+ F : FnOnce ( & mut PrettyEncoder < ' a > ) -> EncodeResult ,
906
906
{
907
907
if idx == 0 {
908
908
try!( write ! ( self . writer, "\n " ) ) ;
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ pub trait Encoder<E> {
91
91
fn emit_map < F > ( & mut self , len : uint , f : F ) -> Result < ( ) , E > where
92
92
F : FnOnce ( & mut Self ) -> Result < ( ) , E > ;
93
93
fn emit_map_elt_key < F > ( & mut self , idx : uint , f : F ) -> Result < ( ) , E > where
94
- F : FnMut ( & mut Self ) -> Result < ( ) , E > ;
94
+ F : FnOnce ( & mut Self ) -> Result < ( ) , E > ;
95
95
fn emit_map_elt_val < F > ( & mut self , idx : uint , f : F ) -> Result < ( ) , E > where
96
96
F : FnOnce ( & mut Self ) -> Result < ( ) , E > ;
97
97
}
You can’t perform that action at this time.
0 commit comments