Remove the extension traits for Readers/Writers

These methods are all excellent candidates for default methods, so there's no
need to require extra imports of various traits.
This commit is contained in:
Alex Crichton
2013-10-25 18:08:45 -07:00
parent 560d9999bc
commit 72557d8312
14 changed files with 518 additions and 641 deletions

View File

@@ -22,7 +22,6 @@ use std::f64;
use std::hashmap::HashMap;
use std::rt::io;
use std::rt::io::Decorator;
use std::rt::io::extensions::ReaderUtil;
use std::rt::io::mem::MemWriter;
use std::num;
use std::str;
@@ -843,7 +842,7 @@ impl<T : Iterator<char>> Parser<T> {
}
/// Decodes a json value from an `&mut io::Reader`
pub fn from_reader(mut rdr: &mut io::Reader) -> Result<Json, Error> {
pub fn from_reader(rdr: &mut io::Reader) -> Result<Json, Error> {
let s = str::from_utf8(rdr.read_to_end());
let mut parser = Parser(~s.iter());
parser.parse()