style: Don't use lazy_static for media feature parsing.

This used to be needed when destructors in statics were not allowed, but
we can get rid of it nowadays.

Differential Revision: https://phabricator.services.mozilla.com/D78109
This commit is contained in:
Emilio Cobos Álvarez 2020-06-03 19:28:16 +02:00
parent 332aec212c
commit 69c7077b3d

View file

@ -538,13 +538,12 @@ macro_rules! system_metric_feature {
}}; }};
} }
lazy_static! { /// Adding new media features requires (1) adding the new feature to this
/// Adding new media features requires (1) adding the new feature to this /// array, with appropriate entries (and potentially any new code needed
/// array, with appropriate entries (and potentially any new code needed /// to support new types in these entries and (2) ensuring that either
/// to support new types in these entries and (2) ensuring that either /// nsPresContext::MediaFeatureValuesChanged is called when the value that
/// nsPresContext::MediaFeatureValuesChanged is called when the value that /// would be returned by the evaluator function could change.
/// would be returned by the evaluator function could change. pub static MEDIA_FEATURES: [MediaFeatureDescription; 53] = [
pub static ref MEDIA_FEATURES: [MediaFeatureDescription; 53] = [
feature!( feature!(
atom!("width"), atom!("width"),
AllowsRanges::Yes, AllowsRanges::Yes,
@ -758,5 +757,4 @@ lazy_static! {
Evaluator::BoolInteger(eval_moz_touch_enabled), Evaluator::BoolInteger(eval_moz_touch_enabled),
ParsingRequirements::empty(), ParsingRequirements::empty(),
), ),
]; ];
}