Skip to content

Commit

Permalink
Run rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jul 15, 2016
1 parent b61d90d commit 56662d4
Show file tree
Hide file tree
Showing 11 changed files with 673 additions and 752 deletions.
14 changes: 7 additions & 7 deletions json/src/builder.rs
Expand Up @@ -35,7 +35,7 @@

use serde::ser;

use value::{self, Value, Map};
use value::{self, Map, Value};

/// This structure provides a simple interface for constructing a JSON array.
#[derive(Default)]
Expand All @@ -62,8 +62,8 @@ impl ArrayBuilder {

/// Creates and passes an `ArrayBuilder` into a closure, then inserts the resulting array into
/// this array.
pub fn push_array<F>(mut self, f: F) -> ArrayBuilder where
F: FnOnce(ArrayBuilder) -> ArrayBuilder
pub fn push_array<F>(mut self, f: F) -> ArrayBuilder
where F: FnOnce(ArrayBuilder) -> ArrayBuilder,
{
let builder = ArrayBuilder::new();
self.array.push(f(builder).build());
Expand All @@ -72,8 +72,8 @@ impl ArrayBuilder {

/// Creates and passes an `ArrayBuilder` into a closure, then inserts the resulting object into
/// this array.
pub fn push_object<F>(mut self, f: F) -> ArrayBuilder where
F: FnOnce(ObjectBuilder) -> ObjectBuilder
pub fn push_object<F>(mut self, f: F) -> ArrayBuilder
where F: FnOnce(ObjectBuilder) -> ObjectBuilder,
{
let builder = ObjectBuilder::new();
self.array.push(f(builder).build());
Expand Down Expand Up @@ -111,7 +111,7 @@ impl ObjectBuilder {
/// this object.
pub fn insert_array<S, F>(mut self, key: S, f: F) -> ObjectBuilder
where S: Into<String>,
F: FnOnce(ArrayBuilder) -> ArrayBuilder
F: FnOnce(ArrayBuilder) -> ArrayBuilder,
{
let builder = ArrayBuilder::new();
self.object.insert(key.into(), f(builder).build());
Expand All @@ -122,7 +122,7 @@ impl ObjectBuilder {
/// this object.
pub fn insert_object<S, F>(mut self, key: S, f: F) -> ObjectBuilder
where S: Into<String>,
F: FnOnce(ObjectBuilder) -> ObjectBuilder
F: FnOnce(ObjectBuilder) -> ObjectBuilder,
{
let builder = ObjectBuilder::new();
self.object.insert(key.into(), f(builder).build());
Expand Down

0 comments on commit 56662d4

Please sign in to comment.