This crate aims to fill a hole in the currently-unstable MaybeUninit
slice-filling API: there is
a safe way to fill a slice, but there is no safe way to drop elements of the slice. For this purpose,
we introduce a wrapper type, Initialized
, which will drop the initialized elements when it goes out of scope.
Regarding safety, we treat the Initialized
structure as if it owns the elements thar are filled. It is instantiated
by using the SliceExt
trait, which is implemented on all MaybeUninit
slices.
As I was writing a higher-order generic numerical integrator, I needed this to write the code safely and nicely, but it didn't exist. So, I implemented it myself!
Licensed under either of
Unless you explicitely state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Feel free to put a copyright header in your name in any files you contribute to.
This page was created on July 2nd, 2025 by James Petersen, [email protected]
This page was updated on July 2nd, 2025 by James Petersen.
This page is at .
© Copyright 2025, James Petersen.