From 29b4eec14187c96a1518af6a954bd00194375382 Mon Sep 17 00:00:00 2001 From: Bastien Orivel Date: Mon, 30 Oct 2017 12:15:30 +0100 Subject: Bump bitflags to 1.0 in every servo crate --- components/style_traits/lib.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'components/style_traits/lib.rs') diff --git a/components/style_traits/lib.rs b/components/style_traits/lib.rs index 98940a5411c..e0f1993c5a8 100644 --- a/components/style_traits/lib.rs +++ b/components/style_traits/lib.rs @@ -197,29 +197,29 @@ impl<'i> StyleParseErrorKind<'i> { bitflags! { /// The mode to use when parsing values. - pub flags ParsingMode: u8 { - /// In CSS, lengths must have units, except for zero values, where the unit can be omitted. + pub struct ParsingMode: u8 { + /// In CSS; lengths must have units, except for zero values, where the unit can be omitted. /// - const PARSING_MODE_DEFAULT = 0x00, - /// In SVG, a coordinate or length value without a unit identifier (e.g., "25") is assumed + const DEFAULT = 0x00; + /// In SVG; a coordinate or length value without a unit identifier (e.g., "25") is assumed /// to be in user units (px). /// - const PARSING_MODE_ALLOW_UNITLESS_LENGTH = 0x01, - /// In SVG, out-of-range values are not treated as an error in parsing. + const ALLOW_UNITLESS_LENGTH = 0x01; + /// In SVG; out-of-range values are not treated as an error in parsing. /// - const PARSING_MODE_ALLOW_ALL_NUMERIC_VALUES = 0x02, + const ALLOW_ALL_NUMERIC_VALUES = 0x02; } } impl ParsingMode { /// Whether the parsing mode allows unitless lengths for non-zero values to be intpreted as px. pub fn allows_unitless_lengths(&self) -> bool { - self.intersects(PARSING_MODE_ALLOW_UNITLESS_LENGTH) + self.intersects(ParsingMode::ALLOW_UNITLESS_LENGTH) } /// Whether the parsing mode allows all numeric values. pub fn allows_all_numeric_values(&self) -> bool { - self.intersects(PARSING_MODE_ALLOW_ALL_NUMERIC_VALUES) + self.intersects(ParsingMode::ALLOW_ALL_NUMERIC_VALUES) } } -- cgit v1.2.3