auto merge of #10721 : osa1/rust/intermediatestr, r=brson
as recommended by @huonw on this PR https://github.com/mozilla/rust/pull/10711 , I removed intermediate step that generates a string instead of directly writing to Writer without generating intermediate string.
This commit is contained in:
commit
9fc48061d7
1 changed files with 2 additions and 3 deletions
|
@ -327,7 +327,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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue