Skip to content

Add comments to justify unsafe blocks. #119

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

Merged
merged 1 commit into from
Feb 14, 2017
Merged

Add comments to justify unsafe blocks. #119

merged 1 commit into from
Feb 14, 2017

Conversation

SimonSapin
Copy link
Member

@SimonSapin SimonSapin commented Feb 14, 2017

This change is Reviewable

fn consume_escape_and_write(tokenizer: &mut Tokenizer, bytes: &mut Vec<u8>) {
use std::io::Write;
write!(bytes, "{}", consume_escape(tokenizer)).unwrap();
bytes.extend(consume_escape(tokenizer).encode_utf8(&mut [0; 4]).as_bytes())
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that encode_utf8 is stable since Rust 1.15.

I’m not convinced this requires a breaking version number increment, but regardless so we’re doing one in #118.

@emilio
Copy link
Member

emilio commented Feb 14, 2017

@bors-servo r+

Yeah, let's roll that change into the colors thing.

@bors-servo
Copy link
Contributor

📌 Commit 6a6f157 has been approved by emilio

@bors-servo
Copy link
Contributor

⌛ Testing commit 6a6f157 with merge 4507fe5...

bors-servo pushed a commit that referenced this pull request Feb 14, 2017
Add comments to justify `unsafe` blocks.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-cssparser/119)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - status-travis
Approved by: emilio
Pushing 4507fe5 to master...

@bors-servo bors-servo merged commit 6a6f157 into master Feb 14, 2017
@SimonSapin SimonSapin deleted the unsafe branch February 14, 2017 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants