File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ fn call_with_ref<'a, F>(some_closure:F) -> i32
339
339
where F: Fn(&'a 32) -> i32 {
340
340
```
341
341
342
- However this presents a problem with in our case. When you specify the explict
342
+ However this presents a problem with in our case. When you specify the explicit
343
343
lifetime on a function it binds that lifetime to the * entire* scope of the function
344
344
instead of just the invocation scope of our closure. This means that the borrow checker
345
345
will see a mutable reference in the same lifetime as our immutable reference and fail
@@ -354,7 +354,7 @@ fn call_with_ref<F>(some_closure:F) -> i32
354
354
```
355
355
356
356
This lets the Rust compiler find the minimum lifetime to invoke our closure and
357
- satisfy the borrow checker's rules. Our function then compiles and excutes as we
357
+ satisfy the borrow checker's rules. Our function then compiles and executes as we
358
358
expect.
359
359
360
360
``` rust
Original file line number Diff line number Diff line change 431
431
432
432
Cargo will ignore files in subdirectories of the ` tests/ ` directory.
433
433
Therefore shared modules in integrations tests are possible.
434
- For example ` tests/common/mod.rs ` is not seperatly compiled by cargo but can
434
+ For example ` tests/common/mod.rs ` is not separately compiled by cargo but can
435
435
be imported in every test with ` mod common; `
436
436
437
437
That's all there is to the ` tests ` directory. The ` tests ` module isn't needed
You can’t perform that action at this time.
0 commit comments