Merge pull request #132 from GeertVL/patch-1

attach instead of attatch typo
This commit is contained in:
Steve Klabnik 2016-07-11 10:20:30 -04:00 committed by GitHub
commit 1ebfe890b4

View File

@ -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 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 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 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 individual components, while leaving the `V6` variant as a `String`. With our
struct, wed be stuck. But enums deal with this case with ease: struct, wed be stuck. But enums deal with this case with ease: