Skip to content

PIDRUsage and PIDFDInfo should be marked unsafe #146

@ethanpailes

Description

@ethanpailes

First of all, thanks for the crate! It's really nice to have these sorts of foundational cross platform crates do the portability for you.

I beleive the two public traits PIDRUsage and PIDFDInfo allow for potential unsoundness if a user implements them incorrectly. https://doc.rust-lang.org/reference/unsafe-keyword.html#unsafe-traits-unsafe-trait says that traits with this property ought to be marked as unsafe so that users know there is something special they need to think about when implementing them. Unfortunately because of the public nature of these traits it will require a breaking version bump to fix the issue.

I went ahead and wrote #145 since the fix seems pretty simple.

This came up as part of Google's unsafe review process for importing new crates, and I'll need a new version to pick up the fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions