Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- nightly
- beta
- stable
- 1.71.0
- 1.85.0
features:
-
- --no-default-features
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ readme = "README.md"
keywords = ["css", "syntax", "parser"]
license = "MPL-2.0"
edition = "2018"
rust-version = "1.71"
rust-version = "1.85"

exclude = ["src/css-parsing-tests/**", "src/big-data-url.css"]

Expand All @@ -22,7 +22,7 @@ smallvec = "1.0"
# Optional dependencies
cssparser-macros = { path = "./macros", version = "0.7.0", optional = true }
malloc_size_of = { version = "0.1", default-features = false, optional = true }
phf = { version = "0.13.1", features = ["macros"], optional = true }
phf = { version = "0.14.0", features = ["macros"], optional = true }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also if this now doesn't require syn 2.0, let's just update to syn 3.0 exclusively while at it.

serde = { version = "1.0", features = ["derive"], optional = true }

[dev-dependencies]
Expand Down
4 changes: 3 additions & 1 deletion color/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ documentation = "https://docs.rs/cssparser-color/"
repository = "https://github.com/servo/rust-cssparser"
license = "MPL-2.0"
edition = "2021"
rust-version = "1.71"
rust-version = "1.85"

[lib]
path = "lib.rs"
Expand All @@ -19,6 +19,8 @@ serde = { version = "1.0", features = ["derive"], optional = true }
[features]
default = ["cssparser/default"]
serde = ["cssparser/serde", "dep:serde"]
# Useful for skipping tests when execution is slow, e.g., under miri
skip_long_tests = []

[dev-dependencies]
serde_json = "1.0.25"
Expand Down
4 changes: 2 additions & 2 deletions color/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ where
/// floating point values.
struct ModernComponent<'a>(&'a Option<f32>);

impl<'a> ToCss for ModernComponent<'a> {
impl ToCss for ModernComponent<'_> {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result
where
W: fmt::Write,
Expand Down Expand Up @@ -1041,7 +1041,7 @@ pub trait ColorParser<'i> {
/// Default implementation of a [`ColorParser`]
pub struct DefaultColorParser;

impl<'i> ColorParser<'i> for DefaultColorParser {
impl ColorParser<'_> for DefaultColorParser {
type Output = Color;
type Error = ();
}
Expand Down
5 changes: 2 additions & 3 deletions color/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ fn run_json_tests<F: Fn(&mut Parser) -> Value>(json_data: &str, parse: F) {
}
fn run_color_tests<F: Fn(Result<Color, ()>) -> Value>(json_data: &str, to_json: F) {
run_json_tests(json_data, |input| {
let result: Result<_, ParseError<()>> =
input.parse_entirely(|i| Color::parse(i).map_err(Into::into));
let result: Result<_, ParseError<()>> = input.parse_entirely(|i| Color::parse(i));
to_json(result.map_err(|_| ()))
});
}
Expand Down Expand Up @@ -317,7 +316,7 @@ fn generic_parser() {
}

struct TestColorParser;
impl<'i> ColorParser<'i> for TestColorParser {
impl ColorParser<'_> for TestColorParser {
type Output = OutputType;
type Error = ();
}
Expand Down
7 changes: 3 additions & 4 deletions src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,10 @@ fn normalize(json: &mut Value) {
normalize(item)
}
}
Value::String(ref mut s) => {
if *s == "extra-input" || *s == "empty" {
*s = "invalid".to_string()
}
Value::String(ref mut s) if *s == "extra-input" || *s == "empty" => {
*s = "invalid".to_string()
}

_ => {}
}
}
Expand Down
Loading