Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upBunch of nitpicks #14728
Bunch of nitpicks #14728
Conversation
highfive
commented
Dec 25, 2016
|
Heads up! This PR modifies the following files:
|
highfive
commented
Dec 25, 2016
|
Looks easy enough r=me after addressing the comments. |
| None => self.headers = Some(Serde(Headers::new())), | ||
| Some(_) => (), | ||
| if self.headers.is_none() { | ||
| self.headers = Some(Serde(Headers::new())) |
This comment has been minimized.
This comment has been minimized.
wafflespeanut
Dec 25, 2016
Member
I've always used this, but I'm not sure whether we should prefer self.headers = self.headers.or(Some(Serde(Headers::new()))) over this.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| } | ||
|
|
||
| self.buckets.insert(k, vec!(t)); | ||
| self.buckets.entry(k).or_insert_with(Vec::new).push(t) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
wafflespeanut
Dec 25, 2016
Member
I don't really have an argument. Even though rustc doesn't care about these cases, I thought we should terminate expressions with semicolons, and leave it as optional for keywords. I'll better leave this to you :)
| Some((size, size_type)) => resizes.push((id, size, size_type)), | ||
| None => () | ||
| if let Some((size, size_type)) = document.window().steal_resize_event() { | ||
| resizes.push((id, size, size_type)) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Addressed review comments, thanks for the review @wafflespeanut! @bors-servo r=Wafflespeanut |
|
|
Bunch of nitpicks I just noticed one while writing #14719, and then grepped and couldn't stop. r? @nox <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14728) <!-- Reviewable:end -->
|
|
emilio commentedDec 25, 2016
•
edited by larsbergstrom
I just noticed one while writing #14719, and then grepped and couldn't stop.
r? @nox
This change is