mirror of
https://github.com/rust-lang/book.git
synced 2026-11-30 18:44:33 -06:00
Fix some bad links I made
This commit is contained in:
@@ -261,9 +261,11 @@ 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 section on [`structs` in Chapter XX], but they’re a common
|
||||
enough feature in many programming languages that you have probably seen them
|
||||
before.
|
||||
methods in the section on [`structs` in Chapter XX][structs], but they’re a
|
||||
common enough feature in many programming languages that you have probably seen
|
||||
them before.
|
||||
|
||||
[structs]: ch05-01-structs.html
|
||||
|
||||
Here’s an example of the `clone()` method in action:
|
||||
|
||||
@@ -274,8 +276,6 @@ let s2 = s1.clone();
|
||||
println!("{}", s1);
|
||||
```
|
||||
|
||||
[`structs`]: ch05-01-structs.html
|
||||
|
||||
This will work just fine. Remember our diagram from before? In this case,
|
||||
it _is_ doing this:
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ We weren't technically precise about the difference between a *package* and a
|
||||
interchangeably and everyone will understand.
|
||||
|
||||
But there are cases when it makes sense to have multiple crates in one project
|
||||
because [insert reasons here]. For example, [insert examples here, maybe
|
||||
log/env_log in rust-lang-nursery?]
|
||||
because (insert reasons here). For example, (insert examples here, maybe
|
||||
log/env_log in rust-lang-nursery?)
|
||||
|
||||
So let's get more precise now. Earlier, we said:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user