Follow rust std: The old io module is now called old_io

This commit is contained in:
Thomas Bahn
2015-02-06 15:26:06 +01:00
parent 9a284ae7c2
commit 5782657502
9 changed files with 47 additions and 47 deletions
+5 -5
View File
@@ -8,8 +8,8 @@ extern crate serde2;
extern crate "rustc-serialize" as rustc_serialize;
extern crate test;
use std::io;
use std::io::ByRefWriter;
use std::old_io;
use std::old_io::ByRefWriter;
use std::num::FromPrimitive;
use test::Bencher;
@@ -928,7 +928,7 @@ impl MyMemWriter0 {
impl Writer for MyMemWriter0 {
#[inline]
fn write(&mut self, buf: &[u8]) -> io::IoResult<()> {
fn write_all(&mut self, buf: &[u8]) -> old_io::IoResult<()> {
self.buf.push_all(buf);
Ok(())
}
@@ -968,7 +968,7 @@ fn push_all_bytes(dst: &mut Vec<u8>, src: &[u8]) {
impl Writer for MyMemWriter1 {
#[inline]
fn write(&mut self, buf: &[u8]) -> io::IoResult<()> {
fn write_all(&mut self, buf: &[u8]) -> old_io::IoResult<()> {
push_all_bytes(&mut self.buf, buf);
Ok(())
}
@@ -1069,7 +1069,7 @@ fn bench_serializer_slice(b: &mut Bencher) {
b.iter(|| {
for item in buf.iter_mut(){ *item = 0; }
let mut wr = std::io::BufWriter::new(&mut buf);
let mut wr = std::old_io::BufWriter::new(&mut buf);
let mut serializer = json::Writer::new(wr.by_ref());
serializer.visit(&log).unwrap();