Skip to content

Commit

Permalink
Replace FromError with From
Browse files Browse the repository at this point in the history
As per rust-lang/rust#23879.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Loading branch information
andersk authored and gbersac committed May 8, 2015
1 parent 3cb96f8 commit 99c3df7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@ impl fmt::Display for EncoderError {
}
}

impl std::error::FromError<fmt::Error> for EncoderError {
fn from_error(err: fmt::Error) -> EncoderError { EncoderError::FmtError(err) }
impl From<fmt::Error> for EncoderError {
fn from(err: fmt::Error) -> EncoderError { EncoderError::FmtError(err) }
}

pub type EncodeResult<T> = Result<T, EncoderError>;
Expand Down

0 comments on commit 99c3df7

Please sign in to comment.