Use build() instead of unwrap() for the Builders

Fixes #429.
This commit is contained in:
David Tolnay 2016-07-29 09:48:47 -07:00
parent 4bf5a15d7e
commit b7f30d7f82
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -68,8 +68,8 @@ fn main() {
.insert("array", ArrayBuilder::new()
.push(1)
.push(2)
.unwrap())
.unwrap();
.build())
.build();
let serialized = serde_json::to_string(&value).unwrap();
println!("serialized value: {:?}", serialized);