Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use MaybeUninit instead of ManuallyDrop to inhibit the validity invariant of the storage type #3

Merged
merged 4 commits into from
Aug 29, 2019

Commits on Aug 26, 2019

  1. Add some failing tests

    ```
    assertion failed: Some(InlineArray::<usize, [Box<()>; 2]>::new()).is_some()
    assertion failed: Some(RingBuffer::<Box<()>>::new()).is_some()
    assertion failed: Some(Chunk::<Box<()>>::new()).is_some()
    assertion failed: Some(SparseChunk::<Box<()>>::new()).is_some()
    ```
    SimonSapin committed Aug 26, 2019
    Configuration menu
    Copy the full SHA
    7390603 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dc1a3df View commit details
    Browse the repository at this point in the history
  3. Use one drop_in_place<[A]> call instead of a loop of drop_in_place<A>…

    … calls where straightforward
    
    This also takes care of returning early if needs_drop returns false
    SimonSapin committed Aug 26, 2019
    Configuration menu
    Copy the full SHA
    7abfc88 View commit details
    Browse the repository at this point in the history
  4. Avoid creating &[A] or &mut [A] with uninitialized A items

    It is undecided whether the Rust language should make this UB,
    so manipulating raw pointers works either way.
    SimonSapin committed Aug 26, 2019
    Configuration menu
    Copy the full SHA
    072f010 View commit details
    Browse the repository at this point in the history