Reimplement Name parsing to support iterating labels, and non-text labels#52
Open
marshallpierce wants to merge 3 commits intotailhook:masterfrom
Open
Reimplement Name parsing to support iterating labels, and non-text labels#52marshallpierce wants to merge 3 commits intotailhook:masterfrom
Name parsing to support iterating labels, and non-text labels#52marshallpierce wants to merge 3 commits intotailhook:masterfrom
Conversation
I don't claim that rustfmt is always right, but rather that this will ease future collaboration. Without this, I have to manually format new code since I can't let the autoformatter do its work. Based on tailhook#50
6c2bd27 to
0b0e906
Compare
marshallpierce
commented
Mar 17, 2026
| documentation = "https://docs.rs/dns-parser" | ||
| version = "0.8.0" | ||
| authors = ["Paul Colomiets <paul@colomiets.name>"] | ||
| edition = "2015" |
Author
There was a problem hiding this comment.
This is the default value for when the edition is left unspecified
| if return_pos.is_none() { | ||
| return_pos = Some(pos); | ||
| Err(_e) => { | ||
| write!(fmt, "<0x{}>", hex::encode(label_bytes))?; |
Author
There was a problem hiding this comment.
Open to ideas on how better to represent a non-text label in Debug
Author
|
Based on #51. |
505f8ef to
27359aa
Compare
…labels The parser is similar to the previous structure, but re-cast as an `Iterator`. Accessing text names is still doable via `StrName`. For use cases that need precise label boundaries, iterating over labels (which was always done internally) is now exposed to the caller if they choose.
27359aa to
af9c865
Compare
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.
The parser is similar to the previous structure, but re-cast as an
Iterator.Accessing text names is still doable via
StrName.For use cases that need precise label boundaries, iterating over labels (which was always done internally) is now exposed to the caller if they choose.
Fixes #48