Refactor names and imports

This commit is contained in:
Vlasislav Kashin
2025-07-13 21:29:41 +03:00
parent 76a8d4857f
commit 6be301ebd8
6 changed files with 32 additions and 15 deletions

View File

@@ -17,7 +17,7 @@
use log::{error};
use super::regex_util::{RegexFullMatch, RegexConsume};
use crate::{interfaces, generated::proto::phonemetadata::PhoneNumberDesc, regexp_cache::{ErrorInvalidRegex, RegexCache}};
use crate::{interfaces, generated::proto::phonemetadata::PhoneNumberDesc, regexp_cache::{InvalidRegexError, RegexCache}};
pub struct RegexBasedMatcher {
cache: RegexCache,
@@ -32,7 +32,7 @@ impl RegexBasedMatcher {
&self, phone_number: &str,
number_pattern: &str,
allow_prefix_match: bool
) -> Result<bool, ErrorInvalidRegex> {
) -> Result<bool, InvalidRegexError> {
let regexp = self.cache.get_regex(number_pattern)?;
// find first occurrence