Skip to content

Commit 65f5292

Browse files
committed
Don't start lines with #. to work around #199
Fixes #474.
1 parent 2a14890 commit 65f5292

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/ch08-02-strings.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ fn add(self, s: &str) -> String {
158158
This isn’t the exact signature that’s in the standard library; there `add` is
159159
defined using generics. Here, we’re looking at the signature of `add` with
160160
concrete types substituted for the generic ones, which is what happens when we
161-
call this method with `String` values. We'll be discussing generics in Chapter
162-
10. This signature gives us the clues we need to understand the tricky bits of
163-
the `+` operator.
161+
call this method with `String` values. We'll be discussing generics in
162+
Chapter 10. This signature gives us the clues we need to understand the tricky
163+
bits of the `+` operator.
164164

165165
First of all, `s2` has an `&`, meaning that we are adding a *reference* of the
166166
second string to the first string. This is because of the `s` parameter in the
@@ -250,8 +250,8 @@ UTF-8. What about this example, though?
250250
let len = String::from("Здравствуйте").len();
251251
```
252252

253-
A person asked how long the string is might say 12. However, Rust’s answer is
254-
24. This is the number of bytes that it takes to encode “Здравствуйте” in
253+
A person asked how long the string is might say 12. However, Rust’s answer
254+
is 24. This is the number of bytes that it takes to encode “Здравствуйте” in
255255
UTF-8, since each Unicode scalar value takes two bytes of storage. Therefore,
256256
an index into the string’s bytes will not always correlate to a valid Unicode
257257
scalar value.

0 commit comments

Comments
 (0)