From c7c974ec4bc2d625ae50488c626e72377bfd8929 Mon Sep 17 00:00:00 2001 From: Adam Crume Date: Tue, 28 Jun 2016 19:44:52 -0700 Subject: [PATCH] Implement Default for Complex Fixes #198 --- complex/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/complex/src/lib.rs b/complex/src/lib.rs index 8cf28ab..9b11318 100644 --- a/complex/src/lib.rs +++ b/complex/src/lib.rs @@ -29,7 +29,7 @@ use traits::{Zero, One, Num, Float}; // probably doesn't map to C's _Complex correctly. /// A complex number in Cartesian form. -#[derive(PartialEq, Copy, Clone, Hash, Debug)] +#[derive(PartialEq, Copy, Clone, Hash, Debug, Default)] #[cfg_attr(feature = "rustc-serialize", derive(RustcEncodable, RustcDecodable))] pub struct Complex { /// Real portion of the complex number