From 2cf339aeda77f29a8ad609f88b67591e0a668b89 Mon Sep 17 00:00:00 2001 From: Daniel Henry-Mantilla Date: Sat, 22 Feb 2020 23:19:05 +0100 Subject: [PATCH] Fix doc example for `MaybeUninit::get_mut()` Suggested by @ametisf in https://github.com/rust-lang/rust/pull/65948#issuecomment-589988183 Co-Authored-By: Frantisek Fladung --- src/libcore/mem/maybe_uninit.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/mem/maybe_uninit.rs b/src/libcore/mem/maybe_uninit.rs index 5fb3c651b6b38..58aaac21ad751 100644 --- a/src/libcore/mem/maybe_uninit.rs +++ b/src/libcore/mem/maybe_uninit.rs @@ -669,7 +669,7 @@ impl MaybeUninit { /// // Now we can use `buf` as a normal slice: /// buf.sort_unstable(); /// assert!( - /// buf.chunks(2).all(|chunk| chunk[0] <= chunk[1]), + /// buf.windows(2).all(|pair| pair[0] <= pair[1]), /// "buffer is sorted", /// ); /// ```