Skip to content

Commit 99c3df7

Browse files
anderskgbersac
authored andcommitted
Replace FromError with From
As per rust-lang/rust#23879. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
1 parent 3cb96f8 commit 99c3df7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/json.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ impl fmt::Display for EncoderError {
411411
}
412412
}
413413

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

418418
pub type EncodeResult<T> = Result<T, EncoderError>;

0 commit comments

Comments
 (0)