Skip to content

Missing safety comment: which variants are upheld?  #3554

Open
@burakemir

Description

@burakemir

Per Rust API Guidelines, unsafe functions should be documented with invariants:
https://rust-lang.github.io/api-guidelines/documentation.html

During review of the source, it was pointed out there is no safety comment here that describes what invariants are upheld:

send_stream: unsafe { UpgradedSendStream::new(send_stream) },

Also UpgradedSendStream::new does not state which invariants need to be upheld.

Would it be possible to add this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-http2Area: HTTP/2 specific.C-choreCategory: chore. a general chore or maintenance task.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions