Previously, converting `&mut [T; N]` to `&[Cell<T>; N]` looks like this:
let array = &mut [1, 2, 3];
let cells: &[Cell<i32>; 3] = Cell::from_mut(&mut array[..])
.as_slice_of_cells()
.try_into()
.unwrap();
With this new helper method, it looks like this:
let array = &mut [1, 2, 3];
let cells: &[Cell<i32>; 3] = Cell::from_mut(array).as_array_of_cells();
|
||
|---|---|---|
| .. | ||
| rfc-1789-as-cell | ||
| rfc-1937-termination-trait | ||
| rfc-2005-default-binding-mode | ||
| rfc-2151-raw-identifiers | ||
| rfc-2175-or-if-while-let | ||
| rfc-2396-target_feature-11 | ||
| rfc1445 | ||
| rfc1717 | ||
| rfc-1014-2.rs | ||
| rfc-1014.rs | ||
| rfc-2302-self-struct-ctor.rs | ||
| rfc-2421-unreserve-pure-offsetof-sizeof-alignof.rs | ||
| rfc1623.rs | ||
| rfc1857-drop-order.rs | ||