From 331e24b03fbdf70e5fb97a95b4add35c8b042fad Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Thu, 14 Jul 2016 16:30:07 -0400 Subject: [PATCH] Reference corrections --- src/ch04-02-ownership.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ch04-02-ownership.md b/src/ch04-02-ownership.md index d176da7af..0ff71d340 100644 --- a/src/ch04-02-ownership.md +++ b/src/ch04-02-ownership.md @@ -263,7 +263,7 @@ copying can be assumed to be inexpensive. But what if we _do_ want to deeply copy the `String`’s data and not just the `String` itself? There’s a common method for that: `clone()`. We will discuss -methods in the next section on [`struct`]s, but they’re a common enough feature +methods in the section on `struct`s, but they’re a common enough feature in many programming languages that you have probably seen them before. Here’s an example of the `clone()` method in action: @@ -275,8 +275,6 @@ let s2 = s1.clone(); println!("{}", s1); ``` -[`struct`]: structs.html - This will work just fine. Remember our diagram from before? In this case, it _is_ doing this: @@ -324,7 +322,7 @@ but nothing that requires allocation or is some form of resource is `Copy`. And you can’t get it wrong: the compiler will throw an error if you incorrectly try to use a type that moves, as we saw above. -Here’s some types that you’ve seen so far that are `Copy`: +Here’s some types that are `Copy`: * All of the integer types, like `u32`. * The booleans, `true` and `false`.