Skip to content

HandShakeFrame::from_bytes returns Result that can never be Err #2113

@Shourya742

Description

@Shourya742

The Result<Self, isize> return type promises fallibility that doesn't exist. Should just return Self. The current signature forces callers to handle an error that is structurally impossible.

  pub fn from_bytes(bytes: Slice) -> Result<Self, isize> {
      Ok(Self::from_bytes_unchecked(bytes))
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions