From 79c7a4be5f774ea013451f36e8244f943f3194a3 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 19 Jul 2017 12:47:07 -0700 Subject: [PATCH] complex: relax the FromStr trait requirements even more --- complex/src/lib.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/complex/src/lib.rs b/complex/src/lib.rs index 62ff99a..a4e2887 100644 --- a/complex/src/lib.rs +++ b/complex/src/lib.rs @@ -743,7 +743,7 @@ impl fmt::Binary for Complex where } impl FromStr for Complex where - T: FromStr + Num + PartialOrd + Clone, T::Err: Error + T: FromStr + Num + Clone { type Err = ParseComplexError; @@ -861,15 +861,13 @@ impl serde::Deserialize for Complex where } #[derive(Debug, PartialEq)] -pub struct ParseComplexError where - E: Error +pub struct ParseComplexError { kind: ComplexErrorKind, } #[derive(Debug, PartialEq)] -enum ComplexErrorKind where - E: Error +enum ComplexErrorKind { ParseError(E), ExprError