Skip to content

Commit

Permalink
Implement Default for Complex
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcrume committed Jun 30, 2016
1 parent f0bc559 commit c7c974e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion complex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> {
/// Real portion of the complex number
Expand Down

0 comments on commit c7c974e

Please sign in to comment.