about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-01-07 20:05:33 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-01-08 23:42:28 -0800
commit6df57ec2e2cf4dc956b43c05fe7c6d6006f0a80a (patch)
tree6e8d71184b32f697f108aed6198b9e44f5982e82 /src/libsyntax
parent7613b15fdbbb9bf770a2c731f4135886b0ff3cf0 (diff)
downloadrust-6df57ec2e2cf4dc956b43c05fe7c6d6006f0a80a.tar.gz
rust-6df57ec2e2cf4dc956b43c05fe7c6d6006f0a80a.zip
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.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/parse/mod.rs3
-rw-r--r--src/libsyntax/print/pprust.rs3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index c20e7f4aaec..b64f16aff59 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -338,7 +338,6 @@ mod test {
     use extra::serialize::Encodable;
     use extra;
     use std::io;
-    use std::io::Decorator;
     use std::io::mem::MemWriter;
     use std::str;
     use codemap::{Span, BytePos, Spanned};
@@ -356,7 +355,7 @@ mod test {
         let mut writer = MemWriter::new();
         let mut encoder = extra::json::Encoder::new(&mut writer as &mut io::Writer);
         val.encode(&mut encoder);
-        str::from_utf8_owned(writer.inner())
+        str::from_utf8_owned(writer.unwrap())
     }
 
     // produce a codemap::span
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index 9725d6e38de..82a7d550f64 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -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
 }