Skip to content
Snippets Groups Projects

Replace occurences of uninitialized with MaybeUninit

Merged AdminXVII requested to merge no-uninit into master
All threads resolved!

mem::uninitialized is deprecated, so move over the not-UB MaybeUninit.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • I see that the &mut references to MaybeUninit stuff are generally replaced by raw pointers, however I am also aware that taking references to MaybeUninit is currently unstable (tracking issue: https://github.com/rust-lang/rust/issues/63568). I am not sure how this fits into relibc's policy of preferring references over pointers "where applicable"?

  • Author Contributor

    The functions using MaybeUninit are generally calling "non-owning" variants of the C calls. Either we must use pointers, or we duplicate the checks and call the Sys directly. I think calling the functions is more maintainable in the long term. That said I'd have no problem making only references is this is deemed preferable.

  • AdminXVII added 25 commits

    added 25 commits

    Compare with previous version

  • AdminXVII resolved all threads

    resolved all threads

  • merged

  • Jeremy Soller mentioned in commit c6e3cb8e

    mentioned in commit c6e3cb8e

  • Please register or sign in to reply
    Loading