We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3564494 commit 59624e8Copy full SHA for 59624e8
1 file changed
src/cast.rs
@@ -5,9 +5,13 @@ macro_rules! impl_to_primitive {
5
($ty:ty, $to:ident) => {
6
#[inline]
7
fn $to(&self) -> Option<$ty> {
8
- if self.im.is_zero() { self.re.$to() } else { None }
+ if self.im.is_zero() {
9
+ self.re.$to()
10
+ } else {
11
+ None
12
+ }
13
}
- }
14
+ };
15
} // impl_to_primitive
16
17
// Returns None if Complex part is non-zero
0 commit comments