Remove unused, refactor exports
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
use strum::EnumIter;
|
||||
use thiserror::Error;
|
||||
|
||||
/// INTERNATIONAL and NATIONAL formats are consistent with the definition
|
||||
/// in ITU-T Recommendation E.123. However we follow local conventions such as
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use core::error;
|
||||
use std::num::ParseIntError;
|
||||
|
||||
use thiserror::Error;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
mod helper_constants;
|
||||
pub mod helper_functions;
|
||||
mod errors;
|
||||
mod enums;
|
||||
mod phonenumberutil;
|
||||
mod helper_functions;
|
||||
pub mod errors;
|
||||
pub mod enums;
|
||||
pub mod phonenumberutil;
|
||||
mod phone_number_regexps_and_mappings;
|
||||
pub(self) mod helper_types;
|
||||
pub(self) mod comparisons;
|
||||
@@ -10,10 +10,8 @@ pub(self) mod comparisons;
|
||||
use std::sync::LazyLock;
|
||||
|
||||
pub use enums::{MatchType, PhoneNumberFormat, PhoneNumberType, ValidNumberLenType};
|
||||
use thiserror::Error;
|
||||
use crate::phonenumberutil::phonenumberutil::PhoneNumberUtil;
|
||||
|
||||
// use crate::phonenumberutil::phonenumberutil::PhoneNumberUtil;
|
||||
|
||||
// static PHONE_NUMBER_UTIL: LazyLock<PhoneNumberUtil> = LazyLock::new(|| {
|
||||
// PhoneNumberUtil::new()
|
||||
// });
|
||||
pub static PHONE_NUMBER_UTIL: LazyLock<PhoneNumberUtil> = LazyLock::new(|| {
|
||||
PhoneNumberUtil::new()
|
||||
});
|
||||
@@ -1,5 +1,5 @@
|
||||
use std::{
|
||||
borrow::Cow, cmp::max, collections::{hash_map, HashMap, HashSet, VecDeque}, sync::Arc
|
||||
borrow::Cow, cmp::max, collections::{HashMap, HashSet, VecDeque}, sync::Arc
|
||||
};
|
||||
|
||||
use super::phone_number_regexps_and_mappings::PhoneNumberRegExpsAndMappings;
|
||||
@@ -136,13 +136,13 @@ impl PhoneNumberUtil {
|
||||
self.country_code_to_non_geographical_metadata_map.keys().map(| k | *k)
|
||||
}
|
||||
|
||||
fn get_supported_calling_codes(&self) -> impl Iterator<Item=i32> {
|
||||
pub fn get_supported_calling_codes(&self) -> impl Iterator<Item=i32> {
|
||||
self.country_calling_code_to_region_code_map
|
||||
.iter()
|
||||
.map(| (k, _) | *k)
|
||||
}
|
||||
|
||||
fn get_supported_types_for_region(
|
||||
pub fn get_supported_types_for_region(
|
||||
&self,
|
||||
region_code: &str,
|
||||
) -> Option<HashSet<PhoneNumberType>> {
|
||||
@@ -155,7 +155,7 @@ impl PhoneNumberUtil {
|
||||
})
|
||||
}
|
||||
|
||||
fn get_supported_types_for_non_geo_entity(
|
||||
pub fn get_supported_types_for_non_geo_entity(
|
||||
&self,
|
||||
country_calling_code: i32,
|
||||
) -> Option<HashSet<PhoneNumberType>> {
|
||||
|
||||
Reference in New Issue
Block a user