Repository navigation
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: 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 -->
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 servo/html5ever#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 -->
Utf8LossyDecoderString::from_utf8_lossy.This introduces two (recursive) dependencies that should probably be reviewed as well:
r? @nox