From 978eead7e8de7309885c22730422e43a956e2d25 Mon Sep 17 00:00:00 2001 From: Geert Van Laethem Date: Mon, 11 Jul 2016 13:36:26 +0200 Subject: [PATCH] attach instead of attatch typo --- src/ch06-01-enums.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch06-01-enums.md b/src/ch06-01-enums.md index 8778cdb..0e669d1 100644 --- a/src/ch06-01-enums.md +++ b/src/ch06-01-enums.md @@ -80,7 +80,7 @@ let loopback = IpAddr::V6(String::from("::1")); We can attach data to each variant of the enum directly. No need for an extra struct. But beyond that, this approach is better than using a struct alongside -our enum because we can attatch different kinds of data to each variant. +our enum because we can attach different kinds of data to each variant. Imagine that instead of a `String`, we would prefer to store a `V4` as its four individual components, while leaving the `V6` variant as a `String`. With our struct, we’d be stuck. But enums deal with this case with ease: