-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce typified wrappers for names and fix couple of bugs #393
Conversation
This is more idiomatic because Reader is decide when to pop scope
This is quite big part of library that needed its own tests, so it is better to it to live in a dedicated module
Codecov Report
@@ Coverage Diff @@
## master #393 +/- ##
==========================================
+ Coverage 60.79% 61.41% +0.62%
==========================================
Files 19 20 +1
Lines 9843 10160 +317
==========================================
+ Hits 5984 6240 +256
- Misses 3859 3920 +61
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Code looks fine, review finished. One remaining general question: Could the namespace buffer be made an internal part of It's also normal to clear the event buffer, and a user might think they ought to do the same with the namespace buffer, but that would probably not end well for them. There's some obvious footguns and not a lot of obvious benefits (unless it's necessary to make the lifetimes work, or something). |
Yes, I totally agree, that namespace buffer should lay in the namespace resolver. I plan to implement that in the next PR |
Co-authored-by: Daniel Alley <dalley@redhat.com>
Add `ResolveResult` with results of namespace resolution and replace two-state `Option<Namespace>` with three-state `ResolveResult`. Since now in that cases `ResolveResult::Unknown` is returned, which can be converted to an `Error::UnknownPrefix` using `TryInto<Option<Namespace>>`
failures (1): reserved_name Co-authored-by: Daniel Alley <dalley@redhat.com>
…me test Co-authored-by: Daniel Alley <dalley@redhat.com>
and `BytesStart::local_name()` and `BytesEnd::local_name()` to return `LocalName`
Fixed bugs:
<element/>
"xml"i
) erroneously was treated as error, although XML spec explicitly requires that fatal error MUST NOT be raised. Because quick-xml does not check names validity, now such names does not produce any error.To fix this kind of errors and avoid messing up different names, a typified wrappers for names was introduced.
This PR is the first step to properly support namespaces in quick-xml.