Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions library/core/src/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ impl<T, const N: usize> [T; N] {
/// let y = x.map(|v| v.len());
/// assert_eq!(y, [6, 9, 3, 3]);
/// ```
#[must_use]
#[stable(feature = "array_map", since = "1.55.0")]
pub fn map<F, U>(self, f: F) -> [U; N]
where
Expand Down
2 changes: 1 addition & 1 deletion library/coretests/tests/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ fn array_map_drop_safety() {
let success = std::panic::catch_unwind(|| {
let items = [0; 10];
let mut nth = 0;
items.map(|_| {
let _ = items.map(|_| {
assert!(nth < num_to_create);
nth += 1;
DropCounter
Expand Down
Loading