Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Jun 13, 2020
1 parent 3564494 commit 59624e8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ macro_rules! impl_to_primitive {
($ty:ty, $to:ident) => {
#[inline]
fn $to(&self) -> Option<$ty> {
if self.im.is_zero() { self.re.$to() } else { None }
if self.im.is_zero() {
self.re.$to()
} else {
None
}
}
}
};
} // impl_to_primitive

// Returns None if Complex part is non-zero
Expand Down

0 comments on commit 59624e8

Please sign in to comment.