Skip to content

Commit

Permalink
Fix a few typos in the doc
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvestre committed Jul 3, 2016
1 parent 872d107 commit 3fcb649
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/doc/book/closures.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ fn call_with_ref<'a, F>(some_closure:F) -> i32
where F: Fn(&'a 32) -> i32 {
```

However this presents a problem with in our case. When you specify the explict
However this presents a problem with in our case. When you specify the explicit
lifetime on a function it binds that lifetime to the *entire* scope of the function
instead of just the invocation scope of our closure. This means that the borrow checker
will see a mutable reference in the same lifetime as our immutable reference and fail
Expand All @@ -354,7 +354,7 @@ fn call_with_ref<F>(some_closure:F) -> i32
```

This lets the Rust compiler find the minimum lifetime to invoke our closure and
satisfy the borrow checker's rules. Our function then compiles and excutes as we
satisfy the borrow checker's rules. Our function then compiles and executes as we
expect.

```rust
Expand Down
2 changes: 1 addition & 1 deletion src/doc/book/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ one.

Cargo will ignore files in subdirectories of the `tests/` directory.
Therefore shared modules in integrations tests are possible.
For example `tests/common/mod.rs` is not seperatly compiled by cargo but can
For example `tests/common/mod.rs` is not separately compiled by cargo but can
be imported in every test with `mod common;`

That's all there is to the `tests` directory. The `tests` module isn't needed
Expand Down

0 comments on commit 3fcb649

Please sign in to comment.