Skip to content

Commit 72f2303

Browse files
committed
Remove broken support for bindings inside match_ignore_ascii_case.
Fix #126.
1 parent f9ea098 commit 72f2303

File tree

4 files changed

+5
-13
lines changed

4 files changed

+5
-13
lines changed

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "cssparser"
4-
version = "0.12.4"
4+
version = "0.13.0"
55
authors = [ "Simon Sapin <simon.sapin@exyr.org>" ]
66

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

2222
[dependencies]
23-
cssparser-macros = {path = "./macros", version = "0.2"}
23+
cssparser-macros = {path = "./macros", version = "0.3"}
2424
heapsize = {version = "0.3", optional = true}
2525
matches = "0.1"
2626
phf = "0.7"

macros/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cssparser-macros"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
55
description = "Procedural macros for cssparser"
66
documentation = "https://docs.rs/cssparser-macros/"

macros/lib.rs

+1-9
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,7 @@ define_proc_macros! {
2727
max_len(arms.iter().flat_map(|arm| &arm.pats).filter_map(|pattern| {
2828
let expr = match *pattern {
2929
syn::Pat::Lit(ref expr) => expr,
30-
syn::Pat::Wild |
31-
syn::Pat::Ident(_, _, None) => return None,
32-
syn::Pat::Ident(_, _, Some(ref sub_pattern)) => {
33-
match **sub_pattern {
34-
syn::Pat::Lit(ref expr) => expr,
35-
syn::Pat::Wild => return None,
36-
_ => panic!("expected string or wildcard pattern, got {:?}", pattern)
37-
}
38-
}
30+
syn::Pat::Wild => return None,
3931
_ => panic!("expected string or wildcard pattern, got {:?}", pattern)
4032
};
4133
match **expr {

src/macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ define_invoke_proc_macro!(cssparser_internal__invoke_proc_macro);
2222
/// "rgba" => parse_rgba(..),
2323
/// "hsl" => parse_hsl(..),
2424
/// "hsla" => parse_hsla(..),
25-
/// name @ _ => Err(format!("unknown function: {}", name))
25+
/// _ => Err(format!("unknown function: {}", function_name))
2626
/// }
2727
/// # ;}
2828
/// # use std::ops::RangeFull;

0 commit comments

Comments
 (0)