Skip to content

Commit 2865944

Browse files
authored
Merge pull request #684 from ehuss/union-tag
Fix match in union example.
2 parents 5b9d2fc + ec346e4 commit 2865944

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/items/unions.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ struct Value {
119119
fn is_zero(v: Value) -> bool {
120120
unsafe {
121121
match v {
122-
Value { tag: I, u: U { i: 0 } } => true,
123-
Value { tag: F, u: U { f: num } } if num == 0.0 => true,
122+
Value { tag: Tag::I, u: U { i: 0 } } => true,
123+
Value { tag: Tag::F, u: U { f: num } } if num == 0.0 => true,
124124
_ => false,
125125
}
126126
}

0 commit comments

Comments
 (0)