Skip to content

Conversation

@ltratt
Copy link

@ltratt ltratt commented Feb 17, 2023

This PR has two commits taking onboard suggestions from Clippy. The first commit is the (hopefully) "obviously correctly (TM)" stuff (82003c9). The second commit has some trickier aspects which I think bear more careful scrutiny (d7ea93b). I have lightly tested this and it doesn't seem to break anything, but I am acutely conscious that I can't test all the code paths.

Note that `write` only seems to be correct with `len` <= u16::MAX so
I've changed the `assert` for that. If the `assert` passes the new
`unwrap` should also be safe.

[Whether the `u16::MAX` limit maximum is a good idea or not is beyond my
ken!]
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

Successfully merging this pull request may close these issues.

1 participant