impl: add read/write_u8/i8 to ByteOrder#222
Open
tisonkun wants to merge 1 commit intoBurntSushi:masterfrom
Open
impl: add read/write_u8/i8 to ByteOrder#222tisonkun wants to merge 1 commit intoBurntSushi:masterfrom
tisonkun wants to merge 1 commit intoBurntSushi:masterfrom
Conversation
tisonkun
commented
Nov 22, 2025
Comment on lines
+1961
to
+1964
| #[inline] | ||
| fn read_u8(buf: &[u8]) -> u8 { | ||
| buf[0] | ||
| } |
Author
There was a problem hiding this comment.
These two methods are the same regardless of the endianness. Not sure if we'd add it as the default impl.
I implement them separately now to make it clear and avoid assumptions before consensus.
Signed-off-by: tison <wander4096@gmail.com>
da42052 to
85b1ece
Compare
Author
|
@BurntSushi any spare time to give this a review? cc @regexident you can review whether this is what you need as well. |
Owner
|
This is an extremely low priority PR. I will get around to it when I get to it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This refers to #92.
cc @BurntSushi