mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
cargo fix --edition
This commit is contained in:
parent
e1fcffb336
commit
a15d33a10e
197 changed files with 1414 additions and 1380 deletions
|
@ -91,8 +91,10 @@ pub mod values;
|
|||
#[macro_use]
|
||||
pub mod viewport;
|
||||
|
||||
pub use specified_value_info::{CssType, KeywordsCollectFn, SpecifiedValueInfo};
|
||||
pub use values::{Comma, CommaWithSpace, CssWriter, OneOrMoreSeparated, Separator, Space, ToCss};
|
||||
pub use crate::specified_value_info::{CssType, KeywordsCollectFn, SpecifiedValueInfo};
|
||||
pub use crate::values::{
|
||||
Comma, CommaWithSpace, CssWriter, OneOrMoreSeparated, Separator, Space, ToCss,
|
||||
};
|
||||
|
||||
/// The error type for all CSS parsing routines.
|
||||
pub type ParseError<'i> = cssparser::ParseError<'i, StyleParseErrorKind<'i>>;
|
||||
|
|
|
@ -324,7 +324,7 @@ impl Separator for Space {
|
|||
let mut results = vec![parse_one(input)?];
|
||||
loop {
|
||||
input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less.
|
||||
if let Ok(item) = input.try(&mut parse_one) {
|
||||
if let Ok(item) = input.r#try(&mut parse_one) {
|
||||
results.push(item);
|
||||
} else {
|
||||
return Ok(results);
|
||||
|
@ -350,9 +350,9 @@ impl Separator for CommaWithSpace {
|
|||
loop {
|
||||
input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less.
|
||||
let comma_location = input.current_source_location();
|
||||
let comma = input.try(|i| i.expect_comma()).is_ok();
|
||||
let comma = input.r#try(|i| i.expect_comma()).is_ok();
|
||||
input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less.
|
||||
if let Ok(item) = input.try(&mut parse_one) {
|
||||
if let Ok(item) = input.r#try(&mut parse_one) {
|
||||
results.push(item);
|
||||
} else if comma {
|
||||
return Err(comma_location.new_unexpected_token_error(Token::Comma));
|
||||
|
@ -507,7 +507,7 @@ macro_rules! define_css_keyword_enum {
|
|||
|
||||
/// Helper types for the handling of specified values.
|
||||
pub mod specified {
|
||||
use ParsingMode;
|
||||
use crate::ParsingMode;
|
||||
|
||||
/// Whether to allow negative lengths or not.
|
||||
#[repr(u8)]
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
//! Helper types for the `@viewport` rule.
|
||||
|
||||
use crate::{CSSPixel, CssWriter, ParseError, PinchZoomFactor, ToCss};
|
||||
use cssparser::Parser;
|
||||
use euclid::TypedSize2D;
|
||||
use std::fmt::{self, Write};
|
||||
use {CSSPixel, CssWriter, ParseError, PinchZoomFactor, ToCss};
|
||||
|
||||
define_css_keyword_enum! {
|
||||
pub enum UserZoom {
|
||||
|
@ -115,9 +115,9 @@ impl Zoom {
|
|||
///
|
||||
/// <https://drafts.csswg.org/css-device-adapt/#descdef-viewport-zoom>
|
||||
pub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Zoom, ParseError<'i>> {
|
||||
use crate::values::specified::AllowedNumericType::NonNegative;
|
||||
use crate::ParsingMode;
|
||||
use cssparser::Token;
|
||||
use values::specified::AllowedNumericType::NonNegative;
|
||||
use ParsingMode;
|
||||
|
||||
let location = input.current_source_location();
|
||||
match *input.next()? {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue