Skip to content

evdev-rs Safety comments are backwards #4808

@RAOF

Description

@RAOF

evdev-rs has a bunch of safety comments of the form:

        // # Safety
        //
        // This is unsafe because it receives a raw C++ pointer as an argument.

This isn't a helpful comment; the standard guidance is that a Safety comment should be a description of either

  1. What invariants are required to be upheld when calling (for an unsafe fn), or
  2. Why the unsafe block is, in fact, safe.

See, for example, #4803

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions