mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 16:08:05 +00:00
ported over to the new std::io, but it's half the speed of std::old_io
This commit is contained in:
+4
-4
@@ -1,6 +1,6 @@
|
||||
use std::error;
|
||||
use std::fmt;
|
||||
use std::old_io;
|
||||
use std::io;
|
||||
|
||||
use de::{Token, TokenKind};
|
||||
|
||||
@@ -82,7 +82,7 @@ impl fmt::Debug for ErrorCode {
|
||||
pub enum Error {
|
||||
/// msg, line, col
|
||||
SyntaxError(ErrorCode, usize, usize),
|
||||
IoError(old_io::IoError),
|
||||
IoError(io::Error),
|
||||
ExpectedError(String, String),
|
||||
MissingFieldError(String),
|
||||
UnknownVariantError(String),
|
||||
@@ -120,8 +120,8 @@ impl fmt::Display for Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl error::FromError<old_io::IoError> for Error {
|
||||
fn from_error(error: old_io::IoError) -> Error {
|
||||
impl error::FromError<io::Error> for Error {
|
||||
fn from_error(error: io::Error) -> Error {
|
||||
Error::IoError(error)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user