소스 검색

complex: relax the FromStr trait requirements even more

Josh Stone 7 년 전
부모
커밋
79c7a4be5f
1개의 변경된 파일3개의 추가작업 그리고 5개의 파일을 삭제
  1. 3 5
      complex/src/lib.rs

+ 3 - 5
complex/src/lib.rs

@@ -743,7 +743,7 @@ impl<T> fmt::Binary for Complex<T> where
 }
 
 impl<T> FromStr for Complex<T> where
-    T: FromStr + Num + PartialOrd + Clone, T::Err: Error
+    T: FromStr + Num + Clone
 {
     type Err = ParseComplexError<T::Err>;
 
@@ -861,15 +861,13 @@ impl<T> serde::Deserialize for Complex<T> where
 }
 
 #[derive(Debug, PartialEq)]
-pub struct ParseComplexError<E> where
-    E: Error
+pub struct ParseComplexError<E>
 {
     kind: ComplexErrorKind<E>,
 }
 
 #[derive(Debug, PartialEq)]
-enum ComplexErrorKind<E> where
-    E: Error
+enum ComplexErrorKind<E>
 {
     ParseError(E),
     ExprError