Refactor names and imports
This commit is contained in:
@@ -17,12 +17,12 @@ use std::num::ParseIntError;
|
||||
|
||||
use thiserror::Error;
|
||||
|
||||
use crate::regexp_cache::ErrorInvalidRegex;
|
||||
use crate::regexp_cache::InvalidRegexError;
|
||||
|
||||
#[derive(Debug, PartialEq, Error)]
|
||||
pub enum InternalLogicError {
|
||||
#[error("{0}")]
|
||||
InvalidRegex(#[from] ErrorInvalidRegex),
|
||||
InvalidRegex(#[from] InvalidRegexError),
|
||||
|
||||
#[error("{0}")]
|
||||
InvalidMetadataForValidRegion(#[from] InvalidMetadataForValidRegionError)
|
||||
@@ -43,7 +43,7 @@ pub enum ParseError {
|
||||
#[error("Too long nsn")]
|
||||
TooLongNsn, // TOO_LONG in the java version.
|
||||
#[error("{0}")]
|
||||
InvalidRegex(#[from] ErrorInvalidRegex),
|
||||
InvalidRegex(#[from] InvalidRegexError),
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Error)]
|
||||
|
||||
@@ -45,7 +45,7 @@ use crate::{
|
||||
phonenumber::{phone_number::CountryCodeSource, PhoneNumber}
|
||||
},
|
||||
region_code::RegionCode, interfaces::MatcherApi, macros::owned_from_cow_or,
|
||||
regex_based_matcher::RegexBasedMatcher, regex_util::{RegexConsume, RegexFullMatch}, regexp_cache::ErrorInvalidRegex, string_util::strip_cow_prefix
|
||||
regex_based_matcher::RegexBasedMatcher, regex_util::{RegexConsume, RegexFullMatch}, regexp_cache::InvalidRegexError, string_util::strip_cow_prefix
|
||||
};
|
||||
|
||||
use dec_from_char::DecimalExtended;
|
||||
@@ -54,7 +54,7 @@ use regex::Regex;
|
||||
|
||||
// Helper type for Result
|
||||
|
||||
pub type RegexResult<T> = std::result::Result<T, ErrorInvalidRegex>;
|
||||
pub type RegexResult<T> = std::result::Result<T, InvalidRegexError>;
|
||||
|
||||
pub type ParseResult<T> = std::result::Result<T, ParseError>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user