Skip to content

Commit

Permalink
Use Num instead of Zero
Browse files Browse the repository at this point in the history
  • Loading branch information
termoshtt committed Oct 3, 2018
1 parent 33f6224 commit 330c91e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cast.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::Complex;
use traits::{AsPrimitive, FromPrimitive, Num, NumCast, ToPrimitive, Zero};
use traits::{AsPrimitive, FromPrimitive, Num, NumCast, ToPrimitive};

macro_rules! impl_to_primitive {
($ty:ty, $to:ident) => {
Expand Down Expand Up @@ -42,7 +42,7 @@ macro_rules! impl_from_primitive {
};
} // impl_from_primitive

impl<T: FromPrimitive + Zero> FromPrimitive for Complex<T> {
impl<T: FromPrimitive + Num> FromPrimitive for Complex<T> {
impl_from_primitive!(usize, from_usize);
impl_from_primitive!(isize, from_isize);
impl_from_primitive!(u8, from_u8);
Expand Down

0 comments on commit 330c91e

Please sign in to comment.