From a00fe8b700dfbb8e4dc0b64f3b7994bb643b7a39 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 2 Apr 2015 06:37:57 -0400 Subject: [PATCH] Replace FromError with From As per https://github.com/rust-lang/rust/pull/23879. Signed-off-by: Anders Kaseorg --- src/bigint.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bigint.rs b/src/bigint.rs index b78f263..fd90ab2 100644 --- a/src/bigint.rs +++ b/src/bigint.rs @@ -65,7 +65,7 @@ use Integer; use core::num::ParseIntError; use std::default::Default; -use std::error::{Error, FromError}; +use std::error::Error; use std::iter::repeat; use std::num::{Int, ToPrimitive, FromPrimitive, FromStrRadix}; use std::ops::{Add, BitAnd, BitOr, BitXor, Div, Mul, Neg, Rem, Shl, Shr, Sub}; @@ -1769,8 +1769,8 @@ impl Error for ParseBigIntError { fn description(&self) -> &str { "failed to parse bigint/biguint" } } -impl FromError for ParseBigIntError { - fn from_error(err: ParseIntError) -> ParseBigIntError { +impl From for ParseBigIntError { + fn from(err: ParseIntError) -> ParseBigIntError { ParseBigIntError::ParseInt(err) } }