style: Fix a warning in layout-2020

This commit is contained in:
Emilio Cobos Álvarez 2020-06-18 23:50:39 +02:00
parent bb8c3ee8ba
commit a7d740331d
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A

View file

@ -34,18 +34,19 @@ fn moz_box_display_values_enabled(context: &ParserContext) -> bool {
static_prefs::pref!("layout.css.xul-box-display-values.content.enabled")
}
#[cfg(not(feature = "servo-layout-2020"))]
fn flexbox_enabled() -> bool {
#[cfg(feature = "servo-layout-2020")]
{
return servo_config::prefs::pref_map()
.get("layout.flexbox.enabled")
.as_bool()
.unwrap_or(false);
}
true
}
#[cfg(feature = "servo-layout-2020")]
fn flexbox_enabled() -> bool {
servo_config::prefs::pref_map()
.get("layout.flexbox.enabled")
.as_bool()
.unwrap_or(false)
}
/// Defines an elements display type, which consists of
/// the two basic qualities of how an element generates boxes
/// <https://drafts.csswg.org/css-display/#propdef-display>