Skip to content

Commit 6f2fb38

Browse files
committed
Replace FromError with From
As per rust-lang/rust#23879. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
1 parent 8184105 commit 6f2fb38

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)