From 43b8bb525102a02f5a030cf5d1b98b6c81272256 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 4 Aug 2022 19:03:43 +0200 Subject: [PATCH] fix(abigen): use correct str Regex (#1566) --- ethers-contract/ethers-contract-abigen/src/filter.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ethers-contract/ethers-contract-abigen/src/filter.rs b/ethers-contract/ethers-contract-abigen/src/filter.rs index 4323ab69..c5023d7e 100644 --- a/ethers-contract/ethers-contract-abigen/src/filter.rs +++ b/ethers-contract/ethers-contract-abigen/src/filter.rs @@ -1,6 +1,6 @@ //! Filtering support for contracts used in [`Abigen`] -use regex::bytes::Regex; +use regex::Regex; use std::collections::HashSet; /// Used to filter contracts that should be _included_ in the abigen generation. @@ -138,7 +138,7 @@ macro_rules! impl_filter { if self.exact.contains(name) { return true } - self.patterns.iter().any(|re| re.is_match(name.as_bytes())) + self.patterns.iter().any(|re| re.is_match(name)) } } };