Conversation
The methods don't return `size` slices, but rather slices of `size` elements. Sorry!
I sure hope this fix is right cc @steveklabnik
I have made changes and built it after that. Please advise, rust-lang#31820
…labnik
Reference implied that use declarations may appear *only* at the top of blocks and modules, but it is not the case, and the following is valid:
```Rust
fn foo() {
let x = 92;
use baz::bar;
}
```
r? @steveklabnik
As a Rust newbie, I found the book's explanation for why the `filter` closure gets a reference very confusing, and tried to figure out why `filter` is somehow less consumptive than `map` -- but it isn't; that's controlled by `iter`/`into_iter`. I flailed around for a while until @habnabit explained it to me, and in retrospect it is quite obvious :-)
|
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
|
@bors r+ p=20 |
|
📌 Commit b660ca5 has been approved by |
|
💔 Test failed - auto-win-gnu-32-nopt-t |
|
@bors: retry |
|
⚡ Previous build results for auto-linux-cross-opt, auto-mac-ios-opt are reusable. Rebuilding only auto-linux-32-nopt-t, auto-linux-32-opt, auto-linux-64-debug-opt, auto-linux-64-nopt-t, auto-linux-64-opt, auto-linux-64-x-android-t, auto-linux-musl-64-opt, auto-mac-32-opt, auto-mac-64-nopt-t, auto-mac-64-opt, auto-win-gnu-32-nopt-t, auto-win-gnu-32-opt, auto-win-gnu-64-nopt-t, auto-win-gnu-64-opt, auto-win-msvc-32-opt, auto-win-msvc-64-opt... |
|
💔 Test failed - auto-mac-64-nopt-t |
|
@bors retry |
|
⚡ Previous build results for auto-linux-cross-opt, auto-linux-musl-64-opt, auto-mac-32-opt, auto-mac-ios-opt are reusable. Rebuilding only auto-linux-32-nopt-t, auto-linux-32-opt, auto-linux-64-debug-opt, auto-linux-64-nopt-t, auto-linux-64-opt, auto-linux-64-x-android-t, auto-mac-64-nopt-t, auto-mac-64-opt, auto-win-gnu-32-nopt-t, auto-win-gnu-32-opt, auto-win-gnu-64-nopt-t, auto-win-gnu-64-opt, auto-win-msvc-32-opt, auto-win-msvc-64-opt... |
if..letinstead of singlematchbranch #31842, Updated the primitive docs for bool #31843, Add more explanation on vec type #31850, reference: clarify use declaration location #31863, Capitalize some occurences of Rust in documentation #31868, book: Explain better why the filter closure gets a reference #31870