diff --git a/tests/jdbc_rule.rs b/tests/jdbc_rule.rs index def97a9..cff5393 100644 --- a/tests/jdbc_rule.rs +++ b/tests/jdbc_rule.rs @@ -29,7 +29,7 @@ fn jdbc_rule_matches_expected_patterns() -> Result<()> { let matches: BTreeSet = regex .captures_iter(sample.as_bytes()) - .filter_map(|caps| caps.name("TOKEN")) + .filter_map(|caps| caps.get(1)) .map(|m| String::from_utf8_lossy(m.as_bytes()).into_owned()) .collect(); @@ -60,7 +60,7 @@ fn jdbc_rule_respects_user_skip_regex() -> Result<()> { let matches: Vec = regex .captures_iter(sample.as_bytes()) - .filter_map(|caps| caps.name("TOKEN")) + .filter_map(|caps| caps.get(1)) .map(|m| String::from_utf8_lossy(m.as_bytes()).into_owned()) .collect();