From 30b676cc00324c16963ef529ba37b49e0200ac5f Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Fri, 26 Apr 2024 21:18:00 +0200 Subject: [PATCH] Add missing .into_iter() --- library/core/src/slice/raw.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/slice/raw.rs b/library/core/src/slice/raw.rs index efdd210c1fac8..a42c2cc4e63a9 100644 --- a/library/core/src/slice/raw.rs +++ b/library/core/src/slice/raw.rs @@ -106,7 +106,7 @@ use crate::ub_checks; /// // SAFETY: see function docstring. /// unsafe { slice::from_raw_parts(ptr, len) } /// }; -/// data.sum() +/// data.into_iter().sum() /// } /// /// // This could be the result of C++'s std::vector::data():