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
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

name = "cssparser"
version = "0.12.4"
version = "0.13.0"
authors = [ "Simon Sapin <simon.sapin@exyr.org>" ]

description = "Rust implementation of CSS Syntax Level 3"
Expand All @@ -20,7 +20,7 @@ difference = "1.0"
encoding_rs = "0.5"

[dependencies]
cssparser-macros = {path = "./macros", version = "0.2"}
cssparser-macros = {path = "./macros", version = "0.3"}
heapsize = {version = "0.3", optional = true}
matches = "0.1"
phf = "0.7"
Expand Down
2 changes: 1 addition & 1 deletion macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cssparser-macros"
version = "0.2.0"
version = "0.3.0"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
description = "Procedural macros for cssparser"
documentation = "https://docs.rs/cssparser-macros/"
Expand Down
10 changes: 1 addition & 9 deletions macros/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,7 @@ define_proc_macros! {
max_len(arms.iter().flat_map(|arm| &arm.pats).filter_map(|pattern| {
let expr = match *pattern {
syn::Pat::Lit(ref expr) => expr,
syn::Pat::Wild |
syn::Pat::Ident(_, _, None) => return None,
syn::Pat::Ident(_, _, Some(ref sub_pattern)) => {
match **sub_pattern {
syn::Pat::Lit(ref expr) => expr,
syn::Pat::Wild => return None,
_ => panic!("expected string or wildcard pattern, got {:?}", pattern)
}
}
syn::Pat::Wild => return None,
_ => panic!("expected string or wildcard pattern, got {:?}", pattern)
};
match **expr {
Expand Down
2 changes: 1 addition & 1 deletion src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ define_invoke_proc_macro!(cssparser_internal__invoke_proc_macro);
/// "rgba" => parse_rgba(..),
/// "hsl" => parse_hsl(..),
/// "hsla" => parse_hsla(..),
/// name @ _ => Err(format!("unknown function: {}", name))
/// _ => Err(format!("unknown function: {}", function_name))
/// }
/// # ;}
/// # use std::ops::RangeFull;
Expand Down