diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-06-01 14:56:04 -0500 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-06-01 14:56:04 -0500 |
commit | 862ebee6e6e1e5f64df00b732b41a8f7f5a5ad6c (patch) | |
tree | dc25313fc4c077e093e34f611afd4e1d5d12cf98 | |
parent | c641ec97f02bf03a97f3562b9d138b14ebe1406c (diff) | |
parent | 18f7fdd26a4e4375964f5963bbb0a0a2828bf5c8 (diff) | |
download | servo-862ebee6e6e1e5f64df00b732b41a8f7f5a5ad6c.tar.gz servo-862ebee6e6e1e5f64df00b732b41a8f7f5a5ad6c.zip |
Auto merge of #11533 - heycam:unimpl-setters, r=mbrubeck
Don't complain about unimplemented setters in release builds.
<!-- Please describe your changes on the following line: -->
I found these `println!`s cause a significant performance hit while testing stylo.
r? @mbrubeck
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it's just a change to some logging info in geckolib
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11533)
<!-- Reviewable:end -->
-rw-r--r-- | ports/geckolib/properties.mako.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ports/geckolib/properties.mako.rs b/ports/geckolib/properties.mako.rs index d1497324474..d6ec0d59de2 100644 --- a/ports/geckolib/properties.mako.rs +++ b/ports/geckolib/properties.mako.rs @@ -425,10 +425,14 @@ impl ${style_struct.trait_name} for ${style_struct.gecko_struct_name} { */ % for longhand in stub_longhands: fn set_${longhand.ident}(&mut self, _: longhands::${longhand.ident}::computed_value::T) { - println!("stylo: Unimplemented property setter: ${longhand.name}"); + if cfg!(debug_assertions) { + println!("stylo: Unimplemented property setter: ${longhand.name}"); + } } fn copy_${longhand.ident}_from(&mut self, _: &Self) { - println!("stylo: Unimplemented property setter: ${longhand.name}"); + if cfg!(debug_assertions) { + println!("stylo: Unimplemented property setter: ${longhand.name}"); + } } % if longhand.need_clone: fn clone_${longhand.ident}(&self) -> longhands::${longhand.ident}::computed_value::T { |