1
Fork 0

Remove the io::Decorator trait

This is just an unnecessary trait that no one's ever going to parameterize over
and it's more useful to just define the methods directly on the types
themselves. The implementors of this type almost always don't want
inner_mut_ref() but they're forced to define it as well.
This commit is contained in:
Alex Crichton 2014-01-07 20:05:33 -08:00
parent 7613b15fdb
commit 6df57ec2e2
25 changed files with 145 additions and 247 deletions

View file

@ -23,7 +23,6 @@ use std::local_data;
use std::io;
use std::io::File;
use std::io::mem::MemWriter;
use std::io::Decorator;
use std::str;
use extra::getopts;
use extra::getopts::groups;
@ -322,7 +321,7 @@ fn json_output(crate: clean::Crate, res: ~[plugins::PluginJson], dst: Path) {
let mut encoder = json::Encoder::new(&mut w as &mut io::Writer);
crate.encode(&mut encoder);
}
str::from_utf8_owned(w.inner())
str::from_utf8_owned(w.unwrap())
};
let crate_json = match json::from_str(crate_json_str) {
Ok(j) => j,