Some random improvements to the code, and a couple small fixes, that could result in unexpected behavior. Although as the write and read functions are called on buffers, they will most likely always return the expected number of bytes.
You might want to run Clippy some times. These changes should fix all the errors, but there are a lot of warnings left. Most of them about creating references when they are not needed.
Some random improvements to the code, and a couple small fixes, that could result in unexpected behavior. Although as the write and read functions are called on buffers, they will most likely always return the expected number of bytes.
You might want to run Clippy some times. These changes should fix all the errors, but there are a lot of warnings left. Most of them about creating references when they are not needed.