Skip to content

Commit 6cf18ff

Browse files
authored
Merge pull request #683 from pnkfelix/patch-1
Eschew fp lit pattern
2 parents fa5dfb8 + b18ea92 commit 6cf18ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/items/unions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ fn is_zero(v: Value) -> bool {
120120
unsafe {
121121
match v {
122122
Value { tag: I, u: U { i: 0 } } => true,
123-
Value { tag: F, u: U { f: 0.0 } } => true,
123+
Value { tag: F, u: U { f: num } } if num == 0.0 => true,
124124
_ => false,
125125
}
126126
}

0 commit comments

Comments
 (0)