Add recommend changes to array
Switch from indexing to zip, and also use `write` on `MaybeUninit`. Add array_map feature to core/src/lib Attempt to fix issue of no such feature Update w/ pickfire's review This changes a couple of names around, adds another small test of variable size, and hides the rustdoc #![feature(..)]. Fmt doctest Add suggestions from lcnr
This commit is contained in:
parent
f6411e4c66
commit
56a651ca15
3 changed files with 21 additions and 15 deletions
|
@ -296,4 +296,8 @@ fn array_map() {
|
|||
let a = [1, 2, 3];
|
||||
let b = a.map(|v| v + 1);
|
||||
assert_eq!(b, [2, 3, 4]);
|
||||
|
||||
let a = [1u8, 2, 3];
|
||||
let b = a.map(|v| v as u64);
|
||||
assert_eq!(b, [1, 2, 3]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue