Skip to content

Commit

Permalink
Merge pull request #684 from ehuss/union-tag
Browse files Browse the repository at this point in the history
Fix match in union example.
  • Loading branch information
ehuss committed Oct 16, 2019
2 parents 5b9d2fc + ec346e4 commit 2865944
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/items/unions.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ struct Value {
fn is_zero(v: Value) -> bool {
unsafe {
match v {
Value { tag: I, u: U { i: 0 } } => true,
Value { tag: F, u: U { f: num } } if num == 0.0 => true,
Value { tag: Tag::I, u: U { i: 0 } } => true,
Value { tag: Tag::F, u: U { f: num } } if num == 0.0 => true,
_ => false,
}
}
Expand Down

0 comments on commit 2865944

Please sign in to comment.