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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repository = "https://github.com/servo/rust-cssparser"
readme = "README.md"
keywords = ["css", "syntax", "parser"]
license = "MPL-2.0"
edition = "2018"
edition = "2024"
rust-version = "1.85"

exclude = ["src/css-parsing-tests/**", "src/big-data-url.css"]
Expand Down
2 changes: 1 addition & 1 deletion color/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description = "Color implementation based on cssparser"
documentation = "https://docs.rs/cssparser-color/"
repository = "https://github.com/servo/rust-cssparser"
license = "MPL-2.0"
edition = "2021"
edition = "2024"
rust-version = "1.85"

[lib]
Expand Down
8 changes: 4 additions & 4 deletions color/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
mod tests;

use cssparser::color::{
clamp_floor_256_f32, clamp_unit_f32, parse_hash_color, serialize_color_alpha,
PredefinedColorSpace, OPAQUE,
OPAQUE, PredefinedColorSpace, clamp_floor_256_f32, clamp_unit_f32, parse_hash_color,
serialize_color_alpha,
};
use cssparser::{match_ignore_ascii_case, CowRcStr, ParseError, Parser, ToCss, Token};
use cssparser::{CowRcStr, ParseError, Parser, ToCss, Token, match_ignore_ascii_case};
use std::f32::consts::PI;
use std::fmt;

Expand Down Expand Up @@ -1070,7 +1070,7 @@ pub trait FromParsedColor {

/// Construct a new color from the `lab` notation.
fn from_lab(lightness: Option<f32>, a: Option<f32>, b: Option<f32>, alpha: Option<f32>)
-> Self;
-> Self;

/// Construct a new color from the `lch` notation.
fn from_lch(
Expand Down
2 changes: 1 addition & 1 deletion color/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use super::*;
use cssparser::ParserInput;
use serde_json::{json, Value};
use serde_json::{Value, json};

fn almost_equals(a: &Value, b: &Value) -> bool {
match (a, b) {
Expand Down
167 changes: 55 additions & 112 deletions fuzz/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name = "cssparser-fuzz"
version = "0.0.0"
authors = ["Automatically generated"]
publish = false
edition = "2018"
edition = "2024"

[package.metadata]
cargo-fuzz = true
Expand Down
7 changes: 3 additions & 4 deletions fuzz/fuzz_targets/cssparser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fn parse_and_serialize(input: &str, preserving_comments: bool) -> String {
let result = do_parse_and_serialize(
&mut parser,
preserving_comments,
TokenSerializationType::nothing(),
TokenSerializationType::Nothing,
&mut serialization,
0,
);
Expand All @@ -27,7 +27,7 @@ fn do_parse_and_serialize<'i>(
mut previous_token_type: TokenSerializationType,
serialization: &mut String,
indent_level: usize,
) -> Result<(), ParseError<'i, ()>> {
) -> Result<(), ParseError<()>> {
loop {
let token = if preserving_comments {
input.next_including_whitespace_and_comments()
Expand All @@ -45,8 +45,7 @@ fn do_parse_and_serialize<'i>(
println!("{:?}", token);
}
if token.is_parse_error() {
let token = token.clone();
return Err(input.new_unexpected_token_error(token));
return Err(ParseError::unexpected_token());
}
let token_type = token.serialization_type();
if previous_token_type.needs_separator_when_before(token_type) {
Expand Down
2 changes: 1 addition & 1 deletion src/cow_rc_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl Clone for CowRcStr<'_> {
#[cold]
#[inline(never)]
unsafe fn drop_slow(ptr: *const String) {
mem::drop(Rc::from_raw(ptr))
unsafe { mem::drop(Rc::from_raw(ptr)) }
}

impl Drop for CowRcStr<'_> {
Expand Down
Loading
Loading