Skip to content

Commit 7f8c687

Browse files
committed
Auto merge of #19490 - oli-obk:json_non_string_key_maps, r=alexcrichton
importing object type string key maps is still supported writing them should be explicit, and can be done as follows ```rust let some_tree_map : TreeMap<String, Json> = ...; Json::Object(some_tree_map).to_writer(&mut writer); ``` related to #8335, #9028, #9142
2 parents 4032b85 + a320149 commit 7f8c687

File tree

3 files changed

+201
-91
lines changed

3 files changed

+201
-91
lines changed

src/librbml/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1059,8 +1059,8 @@ pub mod writer {
10591059
self.end_tag()
10601060
}
10611061

1062-
fn emit_map_elt_key<F>(&mut self, _idx: uint, mut f: F) -> EncodeResult where
1063-
F: FnMut(&mut Encoder<'a, W>) -> EncodeResult,
1062+
fn emit_map_elt_key<F>(&mut self, _idx: uint, f: F) -> EncodeResult where
1063+
F: FnOnce(&mut Encoder<'a, W>) -> EncodeResult,
10641064
{
10651065

10661066
try!(self.start_tag(EsMapKey as uint));

0 commit comments

Comments
 (0)