-
Notifications
You must be signed in to change notification settings - Fork 30
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
Rewrite UTF8Validator #23
Conversation
Reviewed 3 of 3 files at r1. src/stream.rs, line 46 [r1] (raw file): src/stream.rs, line 90 [r1] (raw file): Comments from the review on Reviewable.io |
I did a brief look over the new dependencies, and they look fine. They could both do with a LICENSE file as well as a Cargo.toml file (not all lawyers know their way around Cargo). |
* Rename it to `Utf8LossyDecoder` * Don’t allocate any memory. * Handles errors per [Unicode Standard §5.22 "Best Practice for U+FFFD Substitution"](http://www.unicode.org/versions/Unicode8.0.0/ch05.pdf#G40630) This matches `String::from_utf8_lossy`. This introduces two (recursive) dependencies that should probably be reviewed as well: * [rust-utf8](https://github.com/SimonSapin/rust-utf8) * [string-wrapper]( https://github.com/SimonSapin/rust-std-candidates/tree/master/string-wrapper)
1e3b9d8
to
0954677
Compare
a07be08
to
65d766e
Compare
They accept &[u8]/&str slices as well as tendrils.
I’ve pushed some more changes and used them in html5ever: servo/html5ever#188 Review status: 0 of 5 files reviewed at latest revision, 2 unresolved discussions. src/stream.rs, line 46 [r1] (raw file): src/stream.rs, line 90 [r1] (raw file): Comments from the review on Reviewable.io |
Reviewed 5 of 5 files at r3. src/fmt.rs, line 182 [r3] (raw file): Comments from the review on Reviewable.io |
@bors-servo r+ |
@bors-servo r=asajeffrey |
@bors-servo r+ |
Travis is not feeling well: https://travis-ci.org/servo/tendril/jobs/104723799
I’ve run tests locally on all three Rust release channels. |
Rewrite the high-level API (driver module) to use TendrilSink This depends on servo/tendril#23. This also adds an API to parse from bytes, which is part of #18. r? @nox <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/html5ever/188) <!-- Reviewable:end -->
Utf8LossyDecoder
String::from_utf8_lossy
.This introduces two (recursive) dependencies that should probably be reviewed as well:
r? @nox