File tree Expand file tree Collapse file tree 3 files changed +7
-12
lines changed
Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " json"
3- version = " 0.11.9 "
3+ version = " 0.11.10 "
44authors = [" Maciej Hirsz <maciej.hirsz@gmail.com>" ]
55description = " JSON implementation in Rust"
66repository = " https://github.com/maciejhirsz/json-rust"
Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ pub trait Generator {
114114 }
115115 }
116116
117+ #[ inline( always) ]
117118 fn write_object ( & mut self , object : & Object ) -> io:: Result < ( ) > {
118119 try!( self . write_char ( b'{' ) ) ;
119120 let mut iter = object. iter ( ) ;
Original file line number Diff line number Diff line change @@ -314,17 +314,11 @@ macro_rules! object {
314314 // Non-empty object, no trailing comma.
315315 //
316316 // In this implementation, key/value pairs separated by commas.
317- { $( $key: expr => $value: expr ) ,* } => ( {
318- use $crate:: object:: Object ;
319-
320- let mut object = Object :: new( ) ;
321-
322- $(
323- object. insert( $key, $value. into( ) ) ;
324- ) *
325-
326- $crate:: JsonValue :: Object ( object)
327- } ) ;
317+ { $( $key: expr => $value: expr ) ,* } => {
318+ object!( $(
319+ $key => $value,
320+ ) * )
321+ } ;
328322
329323 // Non-empty object, trailing comma.
330324 //
You can’t perform that action at this time.
0 commit comments