Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FromBytes impl for u8 should have no error case #679

Open
Martoon-00 opened this issue May 3, 2024 · 0 comments
Open

FromBytes impl for u8 should have no error case #679

Martoon-00 opened this issue May 3, 2024 · 0 comments

Comments

@Martoon-00
Copy link

From this code:

impl FromBytes for [u8] {
    type Error = ();
    fn from_bytes(bytes: &[u8]) -> Result<&Self, Self::Error> {
        Ok(bytes)
    }
}

I believe it should rather be type Error = Infallible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant