Skip to content

Conversation

jonathanpallant
Copy link
Collaborator

@jonathanpallant jonathanpallant commented May 20, 2025

clippy points out that iterating over bytes (with .bytes()) on a plain impl io::Read is expensive because each byte will be a sys call.

In benchmarks it makes basically no difference, because we read so little back from the device, but sure - why not.

@jonathanpallant jonathanpallant mentioned this pull request May 20, 2025
@jonathanpallant jonathanpallant changed the title Add buffering to serial input/output Add buffering to serial input May 20, 2025
@jonathanpallant
Copy link
Collaborator Author

Tested on macOS and Windows

@chrysn
Copy link
Contributor

chrysn commented May 20, 2025

Tested on Linux too (just --get-images, but that goes through slip just the same).

@jonathanpallant jonathanpallant merged commit b3b565e into main May 20, 2025
8 checks passed
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.

2 participants