Skip to content

Commit

Permalink
don't create intermediate string while creating json (rustdoc)
Browse files Browse the repository at this point in the history
  • Loading branch information
osa1 committed Nov 29, 2013
1 parent 6c672ee commit bc42358
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/librustdoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ fn json_output(crate: clean::Crate, res: ~[plugins::PluginJson], dst: Path) {
json.insert(~"crate", crate_json);
json.insert(~"plugins", json::Object(plugins_json));

let mut file = File::create(&dst).unwrap();
let output = json::Object(json).to_str();
file.write(output.as_bytes());
let file = @mut File::create(&dst).unwrap();
json::Object(json).to_writer(file as @mut io::Writer);
}

5 comments on commit bc42358

@bors
Copy link
Contributor

@bors bors commented on bc42358 Dec 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from brson
at osa1@bc42358

@bors
Copy link
Contributor

@bors bors commented on bc42358 Dec 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging osa1/rust/intermediatestr = bc42358 into auto

@bors
Copy link
Contributor

@bors bors commented on bc42358 Dec 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

osa1/rust/intermediatestr = bc42358 merged ok, testing candidate = 9fc4806

@bors
Copy link
Contributor

@bors bors commented on bc42358 Dec 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on bc42358 Dec 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 9fc4806

Please sign in to comment.