aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/style/font_metrics.rs3
-rw-r--r--ports/geckolib/glue.rs7
2 files changed, 8 insertions, 2 deletions
diff --git a/components/style/font_metrics.rs b/components/style/font_metrics.rs
index 26be9a17c29..e09de05faa2 100644
--- a/components/style/font_metrics.rs
+++ b/components/style/font_metrics.rs
@@ -12,7 +12,6 @@ use context::SharedStyleContext;
use logical_geometry::WritingMode;
use media_queries::Device;
use properties::style_structs::Font;
-use std::fmt;
/// Represents the font metrics that style needs from a font to compute the
/// value of certain CSS units like `ex`.
@@ -35,7 +34,7 @@ pub enum FontMetricsQueryResult {
}
/// A trait used to represent something capable of providing us font metrics.
-pub trait FontMetricsProvider: fmt::Debug {
+pub trait FontMetricsProvider {
/// Obtain the metrics for given font family.
///
/// TODO: We could make this take the full list, I guess, and save a few
diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs
index 3bab70d5e9c..e8872a4a25e 100644
--- a/ports/geckolib/glue.rs
+++ b/ports/geckolib/glue.rs
@@ -1438,6 +1438,7 @@ macro_rules! impl_basic_rule_funcs_without_getter {
debug: $debug:ident,
to_css: $to_css:ident,
} => {
+ #[cfg(debug_assertions)]
#[no_mangle]
pub extern "C" fn $debug(rule: &$raw_type, result: *mut nsACString) {
read_locked_arc(rule, |rule: &$rule_type| {
@@ -1445,6 +1446,12 @@ macro_rules! impl_basic_rule_funcs_without_getter {
})
}
+ #[cfg(not(debug_assertions))]
+ #[no_mangle]
+ pub extern "C" fn $debug(_: &$raw_type, _: *mut nsACString) {
+ unreachable!()
+ }
+
#[no_mangle]
pub extern "C" fn $to_css(rule: &$raw_type, result: *mut nsAString) {
let global_style_data = &*GLOBAL_STYLE_DATA;