Skip to content

Commit

Permalink
Merge pull request #2138 from danbugs/master
Browse files Browse the repository at this point in the history
small fix ch04-03 & code block typo ch07-02
  • Loading branch information
steveklabnik authored Nov 15, 2019
2 parents ef07245 + 34b0896 commit 81ebaa2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ch04-03-slices.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ in the slice and `ending_index` is one more than the last position in the
slice. Internally, the slice data structure stores the starting position and
the length of the slice, which corresponds to `ending_index` minus
`starting_index`. So in the case of `let world = &s[6..11];`, `world` would be
a slice that contains a pointer to the 7th byte of `s` with a length value of 5.
a slice that contains a pointer to the 7th byte (counting from 1) of `s` with a length value of 5.

Figure 4-6 shows this in a diagram.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Listing 7-1 into *src/lib.rs* to define some modules and function signatures.

<span class="filename">Filename: src/lib.rs</span>

```rust
```rust,ignore
mod front_of_house {
mod hosting {
fn add_to_waitlist() {}
Expand Down

0 comments on commit 81ebaa2

Please sign in to comment.