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
Avoid entraining various Debug impls in release builds #19756
Conversation
Heads up! This PR modifies the following files:
|
r? @emilio |
components/style/dom.rs
Outdated
@@ -746,17 +746,10 @@ pub trait TElement | |||
/// element-backed pseudo-element, in which case we return the originating | |||
/// element. | |||
fn rule_hash_target(&self) -> Self { | |||
if let Some(pseudo) = self.implemented_pseudo_element() { | |||
if let Some(_) = self.implemented_pseudo_element() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: is_some(). Though this was here to try figure out a crash with editor code and we never saw it in the wild.
components/style/dom.rs
Outdated
@@ -746,17 +746,10 @@ pub trait TElement | |||
/// element-backed pseudo-element, in which case we return the originating | |||
/// element. | |||
fn rule_hash_target(&self) -> Self { | |||
if let Some(pseudo) = self.implemented_pseudo_element() { | |||
if let Some(_) = self.implemented_pseudo_element() { | |||
match self.closest_non_native_anonymous_ancestor() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now this can use expect()
MozReview-Commit-ID: Lp9i9EI5qdU
d5c3afa
to
f858ce9
Compare
@bors-servo r=emilio |
📌 Commit f858ce9 has been approved by |
Avoid entraining various Debug impls in release builds See https://bugzilla.mozilla.org/show_bug.cgi?id=1351737#c29 This patch saves more than 80k of code size. <!-- 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/19756) <!-- Reviewable:end -->
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev |
See https://bugzilla.mozilla.org/show_bug.cgi?id=1351737#c29
This patch saves more than 80k of code size.
This change is