Skip to content

Commit

Permalink
Use MaybeUninit::assume_init_read.
Browse files Browse the repository at this point in the history
This method has been renamed from `MaybeUninit::read`.
Fixes issue slightlyoutofphase#42.
  • Loading branch information
timothee-haudebourg committed Sep 13, 2020
1 parent c411c1c commit 05d1f30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1768,7 +1768,7 @@ impl<T, const N: usize> StaticVec<T, N> {
// Set the length of `self` to 0 to prevent double-drops.
self.length = 0;
// Read out the contents of `data`.
unsafe { Ok(self.data.read()) }
unsafe { Ok(self.data.assume_init_read()) }
}
}

Expand Down

0 comments on commit 05d1f30

Please sign in to comment.