Skip to content

Commit 98dcb57

Browse files
committed
0.11.10
1 parent 0768e61 commit 98dcb57

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "json"
3-
version = "0.11.9"
3+
version = "0.11.10"
44
authors = ["Maciej Hirsz <[email protected]>"]
55
description = "JSON implementation in Rust"
66
repository = "https://github.com/maciejhirsz/json-rust"

src/codegen.rs

+1
Original file line numberDiff line numberDiff 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();

src/lib.rs

+5-11
Original file line numberDiff line numberDiff 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
//

0 commit comments

Comments
 (0)