From ec346e4ccac2a46db8e8348072c97f6dee20a719 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Thu, 26 Sep 2019 08:58:15 -0700 Subject: [PATCH] Fix match in union example. I think the intent here is to match on the variant. The current example is binding variables named "I" and "F". --- src/items/unions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/items/unions.md b/src/items/unions.md index 26c7481ad..d63bf1eec 100644 --- a/src/items/unions.md +++ b/src/items/unions.md @@ -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, } }