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:
@@ -32,7 +32,6 @@ use std::cell::RefCell;
|
||||
use std::char;
|
||||
use std::str;
|
||||
use std::io;
|
||||
use std::io::Decorator;
|
||||
use std::io::mem::MemWriter;
|
||||
|
||||
// The &mut ps is stored here to prevent recursive type.
|
||||
@@ -2322,7 +2321,7 @@ pub fn print_string(s: &mut ps, st: &str, style: ast::StrStyle) {
|
||||
// downcasts.
|
||||
unsafe fn get_mem_writer(writer: &mut ~io::Writer) -> ~str {
|
||||
let (_, wr): (uint, ~MemWriter) = cast::transmute_copy(writer);
|
||||
let result = str::from_utf8_owned(wr.inner_ref().to_owned());
|
||||
let result = str::from_utf8_owned(wr.get_ref().to_owned());
|
||||
cast::forget(wr);
|
||||
result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user