From 34c922509a842ad70c59a24a38eb8672e2107271 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 14 Jun 2019 15:14:42 -0600 Subject: [PATCH] chore(CI): Push the regex lint under a rug --- build.rs | 1 + src/tokens.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/build.rs b/build.rs index 6e08dc5..ff8d85b 100644 --- a/build.rs +++ b/build.rs @@ -24,6 +24,7 @@ fn main() { for record in &records { let value = format!(r#""{}""#, &record[1]); builder.entry(unicase::UniCase(&record[0]), &value); + break; } builder.build(&mut file).unwrap(); write!(&mut file, ";\n").unwrap(); diff --git a/src/tokens.rs b/src/tokens.rs index 70948da..e3621f0 100644 --- a/src/tokens.rs +++ b/src/tokens.rs @@ -11,6 +11,8 @@ impl<'t> Symbol<'t> { pub fn parse(content: &[u8]) -> impl Iterator> { lazy_static::lazy_static! { + // Getting false positives for this lint + #[allow(clippy::invalid_regex)] static ref SPLIT: regex::bytes::Regex = regex::bytes::Regex::new(r#"\b(\p{Alphabetic}|\d|_)+\b"#).unwrap(); } SPLIT