aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/font_face.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/style/font_face.rs')
-rw-r--r--components/style/font_face.rs28
1 files changed, 14 insertions, 14 deletions
diff --git a/components/style/font_face.rs b/components/style/font_face.rs
index d257aa53773..eb258ccf435 100644
--- a/components/style/font_face.rs
+++ b/components/style/font_face.rs
@@ -6,29 +6,29 @@
//!
//! [ff]: https://drafts.csswg.org/css-fonts/#at-font-face-rule
+use crate::error_reporting::ContextualParseError;
+use crate::parser::{Parse, ParserContext};
+use crate::shared_lock::{SharedRwLockReadGuard, ToCssWithGuard};
+use crate::str::CssStringWriter;
+use crate::values::computed::font::FamilyName;
+use crate::values::generics::font::FontStyle as GenericFontStyle;
+use crate::values::specified::font::SpecifiedFontStyle;
+use crate::values::specified::font::{AbsoluteFontWeight, FontStretch};
+use crate::values::specified::url::SpecifiedUrl;
+use crate::values::specified::Angle;
#[cfg(feature = "gecko")]
use cssparser::UnicodeRange;
use cssparser::{AtRuleParser, DeclarationListParser, DeclarationParser, Parser};
use cssparser::{CowRcStr, SourceLocation};
-use error_reporting::ContextualParseError;
-use parser::{Parse, ParserContext};
#[cfg(feature = "gecko")]
use properties::longhands::font_language_override;
use selectors::parser::SelectorParseErrorKind;
-use shared_lock::{SharedRwLockReadGuard, ToCssWithGuard};
use std::fmt::{self, Write};
-use str::CssStringWriter;
use style_traits::values::SequenceWriter;
use style_traits::{Comma, CssWriter, OneOrMoreSeparated, ParseError};
use style_traits::{StyleParseErrorKind, ToCss};
-use values::computed::font::FamilyName;
-use values::generics::font::FontStyle as GenericFontStyle;
-use values::specified::font::SpecifiedFontStyle;
-use values::specified::font::{AbsoluteFontWeight, FontStretch};
#[cfg(feature = "gecko")]
use values::specified::font::{SpecifiedFontFeatureSettings, SpecifiedFontVariationSettings};
-use values::specified::url::SpecifiedUrl;
-use values::specified::Angle;
/// A source for a font-face rule.
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
@@ -118,7 +118,7 @@ macro_rules! impl_range {
) -> Result<Self, ParseError<'i>> {
let first = $component::parse(context, input)?;
let second = input
- .try(|input| $component::parse(context, input))
+ .r#try(|input| $component::parse(context, input))
.unwrap_or_else(|_| first.clone());
Ok($range(first, second))
}
@@ -232,7 +232,7 @@ impl Parse for FontStyle {
GenericFontStyle::Italic => FontStyle::Italic,
GenericFontStyle::Oblique(angle) => {
let second_angle = input
- .try(|input| SpecifiedFontStyle::parse_angle(context, input))
+ .r#try(|input| SpecifiedFontStyle::parse_angle(context, input))
.unwrap_or_else(|_| angle.clone());
FontStyle::Oblique(angle, second_angle)
@@ -378,7 +378,7 @@ impl Parse for Source {
input: &mut Parser<'i, 't>,
) -> Result<Source, ParseError<'i>> {
if input
- .try(|input| input.expect_function_matching("local"))
+ .r#try(|input| input.expect_function_matching("local"))
.is_ok()
{
return input
@@ -390,7 +390,7 @@ impl Parse for Source {
// Parsing optional format()
let format_hints = if input
- .try(|input| input.expect_function_matching("format"))
+ .r#try(|input| input.expect_function_matching("format"))
.is_ok()
{
input.parse_nested_block(|input| {