mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-12 21:21:02 +00:00
Update to rust head
This commit is contained in:
+2
-2
@@ -453,11 +453,11 @@ impl Log {
|
|||||||
#[bench]
|
#[bench]
|
||||||
fn bench_encoder(b: &mut Bencher) {
|
fn bench_encoder(b: &mut Bencher) {
|
||||||
let log = Log::new();
|
let log = Log::new();
|
||||||
let json = serialize::json::Encoder::str_encode(&log);
|
let json = serialize::json::encode(&log);
|
||||||
let _len = json.len();
|
let _len = json.len();
|
||||||
|
|
||||||
b.iter(|| {
|
b.iter(|| {
|
||||||
let _ = serialize::json::Encoder::str_encode(&log);
|
let _ = serialize::json::encode(&log);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3691,7 +3691,7 @@ mod bench {
|
|||||||
|
|
||||||
let mut list = vec!();
|
let mut list = vec!();
|
||||||
for _ in range(0, count) {
|
for _ in range(0, count) {
|
||||||
list.push(json::Object(box treemap!(
|
list.push(json::Object(treemap!(
|
||||||
"a".to_string() => json::Boolean(true),
|
"a".to_string() => json::Boolean(true),
|
||||||
"b".to_string() => json::Null,
|
"b".to_string() => json::Null,
|
||||||
"c".to_string() => json::Number(3.1415),
|
"c".to_string() => json::Number(3.1415),
|
||||||
@@ -3703,7 +3703,7 @@ mod bench {
|
|||||||
))
|
))
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
list.push(json::Object(box TreeMap::new()));
|
list.push(json::Object(TreeMap::new()));
|
||||||
json::List(list)
|
json::List(list)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user