mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
cargo fix --edition
This commit is contained in:
parent
e1fcffb336
commit
a15d33a10e
197 changed files with 1414 additions and 1380 deletions
|
@ -4,16 +4,16 @@
|
|||
|
||||
//! Specified types for UI properties.
|
||||
|
||||
use crate::parser::{Parse, ParserContext};
|
||||
use crate::values::generics::ui as generics;
|
||||
use crate::values::specified::color::Color;
|
||||
use crate::values::specified::url::SpecifiedImageUrl;
|
||||
use crate::values::specified::Number;
|
||||
use crate::values::{Auto, Either};
|
||||
use cssparser::Parser;
|
||||
use parser::{Parse, ParserContext};
|
||||
use std::fmt::{self, Write};
|
||||
use style_traits::cursor::CursorKind;
|
||||
use style_traits::{CssWriter, ParseError, StyleParseErrorKind, ToCss};
|
||||
use values::generics::ui as generics;
|
||||
use values::specified::color::Color;
|
||||
use values::specified::url::SpecifiedImageUrl;
|
||||
use values::specified::Number;
|
||||
use values::{Auto, Either};
|
||||
|
||||
/// auto | <color>
|
||||
pub type ColorOrAuto = Either<Color, Auto>;
|
||||
|
@ -32,7 +32,7 @@ impl Parse for Cursor {
|
|||
) -> Result<Self, ParseError<'i>> {
|
||||
let mut images = vec![];
|
||||
loop {
|
||||
match input.try(|input| CursorImage::parse(context, input)) {
|
||||
match input.r#try(|input| CursorImage::parse(context, input)) {
|
||||
Ok(image) => images.push(image),
|
||||
Err(_) => break,
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ impl Parse for CursorImage {
|
|||
) -> Result<Self, ParseError<'i>> {
|
||||
Ok(Self {
|
||||
url: SpecifiedImageUrl::parse(context, input)?,
|
||||
hotspot: match input.try(|input| Number::parse(context, input)) {
|
||||
hotspot: match input.r#try(|input| Number::parse(context, input)) {
|
||||
Ok(number) => Some((number, Number::parse(context, input)?)),
|
||||
Err(_) => None,
|
||||
},
|
||||
|
@ -131,7 +131,7 @@ impl Parse for ScrollbarColor {
|
|||
context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Self, ParseError<'i>> {
|
||||
if input.try(|i| i.expect_ident_matching("auto")).is_ok() {
|
||||
if input.r#try(|i| i.expect_ident_matching("auto")).is_ok() {
|
||||
return Ok(generics::ScrollbarColor::Auto);
|
||||
}
|
||||
Ok(generics::ScrollbarColor::Colors {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue