File tree 3 files changed +7
-12
lines changed
3 files changed +7
-12
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " json"
3
- version = " 0.11.9 "
3
+ version = " 0.11.10 "
4
4
authors = [
" Maciej Hirsz <[email protected] >" ]
5
5
description = " JSON implementation in Rust"
6
6
repository = " https://github.com/maciejhirsz/json-rust"
Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ pub trait Generator {
114
114
}
115
115
}
116
116
117
+ #[ inline( always) ]
117
118
fn write_object ( & mut self , object : & Object ) -> io:: Result < ( ) > {
118
119
try!( self . write_char ( b'{' ) ) ;
119
120
let mut iter = object. iter ( ) ;
Original file line number Diff line number Diff line change @@ -314,17 +314,11 @@ macro_rules! object {
314
314
// Non-empty object, no trailing comma.
315
315
//
316
316
// 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
+ } ;
328
322
329
323
// Non-empty object, trailing comma.
330
324
//
You can’t perform that action at this time.
0 commit comments