mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
cargo fix --edition
This commit is contained in:
parent
e1fcffb336
commit
a15d33a10e
197 changed files with 1414 additions and 1380 deletions
|
@ -6,6 +6,16 @@
|
|||
|
||||
use app_units::Au;
|
||||
use byteorder::{BigEndian, ByteOrder};
|
||||
use crate::values::animated::{ToAnimatedValue, ToAnimatedZero};
|
||||
use crate::values::computed::{Angle, Context, Integer, NonNegativeLength, NonNegativePercentage};
|
||||
use crate::values::computed::{Number, Percentage, ToComputedValue};
|
||||
use crate::values::generics::font::{
|
||||
self as generics, FeatureTagValue, FontSettings, VariationValue,
|
||||
};
|
||||
use crate::values::specified::font::{self as specified, MAX_FONT_WEIGHT, MIN_FONT_WEIGHT};
|
||||
use crate::values::specified::length::{FontBaseSize, NoCalcLength};
|
||||
use crate::values::CSSFloat;
|
||||
use crate::Atom;
|
||||
use cssparser::{serialize_identifier, CssStringWriter, Parser};
|
||||
#[cfg(feature = "gecko")]
|
||||
use gecko_bindings::sugar::refptr::RefPtr;
|
||||
|
@ -18,17 +28,11 @@ use std::hash::{Hash, Hasher};
|
|||
#[cfg(feature = "servo")]
|
||||
use std::slice;
|
||||
use style_traits::{CssWriter, ParseError, ToCss};
|
||||
use values::animated::{ToAnimatedValue, ToAnimatedZero};
|
||||
use values::computed::{Angle, Context, Integer, NonNegativeLength, NonNegativePercentage};
|
||||
use values::computed::{Number, Percentage, ToComputedValue};
|
||||
use values::generics::font::{self as generics, FeatureTagValue, FontSettings, VariationValue};
|
||||
use values::specified::font::{self as specified, MAX_FONT_WEIGHT, MIN_FONT_WEIGHT};
|
||||
use values::specified::length::{FontBaseSize, NoCalcLength};
|
||||
use values::CSSFloat;
|
||||
use Atom;
|
||||
|
||||
pub use values::computed::Length as MozScriptMinSize;
|
||||
pub use values::specified::font::{FontSynthesis, MozScriptSizeMultiplier, XLang, XTextZoom};
|
||||
pub use crate::values::computed::Length as MozScriptMinSize;
|
||||
pub use crate::values::specified::font::{
|
||||
FontSynthesis, MozScriptSizeMultiplier, XLang, XTextZoom,
|
||||
};
|
||||
|
||||
/// A value for the font-weight property per:
|
||||
///
|
||||
|
@ -370,7 +374,7 @@ impl SingleFontFamily {
|
|||
|
||||
/// Parse a font-family value
|
||||
pub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
|
||||
if let Ok(value) = input.try(|i| i.expect_string_cloned()) {
|
||||
if let Ok(value) = input.r#try(|i| i.expect_string_cloned()) {
|
||||
return Ok(SingleFontFamily::FamilyName(FamilyName {
|
||||
name: Atom::from(&*value),
|
||||
syntax: FamilyNameSyntax::Quoted,
|
||||
|
@ -415,7 +419,7 @@ impl SingleFontFamily {
|
|||
value.push(' ');
|
||||
value.push_str(&ident);
|
||||
}
|
||||
while let Ok(ident) = input.try(|i| i.expect_ident_cloned()) {
|
||||
while let Ok(ident) = input.r#try(|i| i.expect_ident_cloned()) {
|
||||
value.push(' ');
|
||||
value.push_str(&ident);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue