Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor error in MaybeUninit::get_mut() doc example #69386

Conversation

danielhenrymantilla
Copy link
Contributor

In the MaybeUninit::get_mut() example I wanted to assert that the slice was sorted and mistakenly used .chunks(2) rather than .windows(2) to assert it, as @ametisf pointed out in #65948 (comment) .

This fixes it.

Suggested by @ametisf in rust-lang#65948 (comment)

Co-Authored-By: Frantisek Fladung <fladufra@fel.cvut.cz>
@rust-highfive
Copy link
Collaborator

r? @shepmaster

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 22, 2020
@Dylan-DPC-zz
Copy link

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 23, 2020

📌 Commit 2cf339a has been approved by Dylan-DPC

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 23, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 24, 2020
…cs_replace_chunk_with_windows, r=Dylan-DPC

Fix minor error in `MaybeUninit::get_mut()` doc example

In the `MaybeUninit::get_mut()` example I wanted to assert that the slice was sorted and mistakenly used `.chunks(2)` rather than `.windows(2)` to assert it, as @ametisf pointed out in rust-lang#65948 (comment) .

This fixes it.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 24, 2020
…cs_replace_chunk_with_windows, r=Dylan-DPC

Fix minor error in `MaybeUninit::get_mut()` doc example

In the `MaybeUninit::get_mut()` example I wanted to assert that the slice was sorted and mistakenly used `.chunks(2)` rather than `.windows(2)` to assert it, as @ametisf pointed out in rust-lang#65948 (comment) .

This fixes it.
bors added a commit that referenced this pull request Feb 24, 2020
Rollup of 5 pull requests

Successful merges:

 - #69372 (Updates links in various Compiler Error Index entries)
 - #69385 (Relax str::get_unchecked precondition to permit empty slicing)
 - #69386 (Fix minor error in `MaybeUninit::get_mut()` doc example)
 - #69394 (Clean up E0367 explanation)
 - #69405 (docs: Stdin::read_line: mention the appending)

Failed merges:

r? @ghost
@bors bors merged commit c293ac9 into rust-lang:master Feb 24, 2020
@danielhenrymantilla danielhenrymantilla deleted the maybe_uninit_docs_replace_chunk_with_windows branch March 2, 2020 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants