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))
}
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.