Skip to content

Commit 5b09f2a

Browse files
authored
Auto merge of #34238 - jpreiss:master, r=steveklabnik
fix typo in primitive-types section on slices
2 parents 4c45d26 + c0c43b1 commit 5b09f2a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/doc/book/loops.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ loop {
178178

179179
We now loop forever with `loop` and use `break` to break out early. Issuing an explicit `return` statement will also serve to terminate the loop early.
180180

181-
`continue` is similar, but instead of ending the loop, goes to the next
181+
`continue` is similar, but instead of ending the loop, it goes to the next
182182
iteration. This will only print the odd numbers:
183183

184184
```rust

src/doc/book/primitive-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ A ‘slice’ is a reference to (or “view” into) another data structure. The
163163
useful for allowing safe, efficient access to a portion of an array without
164164
copying. For example, you might want to reference only one line of a file read
165165
into memory. By nature, a slice is not created directly, but from an existing
166-
variable binding. Slices have a defined length, can be mutable or immutable.
166+
variable binding. Slices have a defined length, and can be mutable or immutable.
167167

168168
Internally, slices are represented as a pointer to the beginning of the data
169169
and a length.

0 commit comments

Comments
 (0)