Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Shrink unsafe block #51

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion crates/building_blocks_storage/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ where
{
/// Create a new array for `extent` where each point's value is determined by the `filler` function.
pub fn fill_with(extent: ExtentN<N>, mut filler: impl FnMut(PointN<N>) -> Chan::Data) -> Self {
let mut array = unsafe { Array::<_, UninitChan>::maybe_uninit(extent) };
unsafe {
let mut array = Array::<_, UninitChan>::maybe_uninit(extent);

array.for_each_mut_ptr(&extent, |p, val| {
val.into_multi_mut_ptr().write(filler(p));
Expand Down