Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
shingtaklam1324 committed Feb 15, 2018
2 parents d42e12b + 3173b12 commit 59f38b4
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1077,9 +1077,16 @@ impl<T> serde::Deserialize for Complex<T> where
}

#[cfg(feature = "rand")]
impl<T> rand::Rand for Complex<T>
where
T: rand::Rand,
impl<T> rand::Rand for Complex<T> where
T: rand::Rand + Num + Clone
{
fn rand<R:rand::Rng>(rng: &mut R) -> Self {
Self::new(rng.gen::<T>(), rng.gen::<T>())
}
}

#[derive(Debug, PartialEq)]
pub struct ParseComplexError<E>
{
kind: ComplexErrorKind<E>,
}
Expand Down

0 comments on commit 59f38b4

Please sign in to comment.