Skip to content

Commit

Permalink
trivial fixes to documentation (book)
Browse files Browse the repository at this point in the history
  • Loading branch information
bnewbold committed May 11, 2016
1 parent c049541 commit 8e8f391
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/doc/book/crates-and-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ $ ls target/debug
build deps examples libphrases-a7448e02a0468eaa.rlib native
```

`libphrases-hash.rlib` is the compiled crate. Before we see how to use this
`libphrases-<hash>.rlib` is the compiled crate. Before we see how to use this
crate from another crate, let’s break it up into multiple files.

# Multiple File Crates
Expand Down
4 changes: 2 additions & 2 deletions src/doc/book/error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ sense to put it into a function:
```rust
# fn find(_: &str, _: char) -> Option<usize> { None }
// Returns the extension of the given file name, where the extension is defined
// as all characters proceeding the first `.`.
// as all characters following the first `.`.
// If `file_name` has no `.`, then `None` is returned.
fn extension_explicit(file_name: &str) -> Option<&str> {
match find(file_name, '.') {
Expand Down Expand Up @@ -274,7 +274,7 @@ to get rid of the case analysis:
```rust
# fn find(_: &str, _: char) -> Option<usize> { None }
// Returns the extension of the given file name, where the extension is defined
// as all characters proceeding the first `.`.
// as all characters following the first `.`.
// If `file_name` has no `.`, then `None` is returned.
fn extension(file_name: &str) -> Option<&str> {
find(file_name, '.').map(|i| &file_name[i+1..])
Expand Down
4 changes: 2 additions & 2 deletions src/doc/book/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ fn it_works() {
```

`assert!` is a macro provided by Rust which takes one argument: if the argument
is `true`, nothing happens. If the argument is `false`, it `panic!`s. Let's run
our tests again:
is `true`, nothing happens. If the argument is `false`, it will `panic!`. Let's
run our tests again:

```bash
$ cargo test
Expand Down

0 comments on commit 8e8f391

Please sign in to comment.