mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
build(deps): migrate usages of once_cell crate to standard library equivalents (#8030)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -1,10 +1,9 @@
|
||||
//! Custom validations for some shared types.
|
||||
|
||||
use std::collections::HashSet;
|
||||
use std::{collections::HashSet, sync::LazyLock};
|
||||
|
||||
use error_stack::report;
|
||||
use globset::Glob;
|
||||
use once_cell::sync::Lazy;
|
||||
use regex::Regex;
|
||||
#[cfg(feature = "logs")]
|
||||
use router_env::logger;
|
||||
@ -25,7 +24,7 @@ pub fn validate_phone_number(phone_number: &str) -> Result<(), ValidationError>
|
||||
/// Performs a simple validation against a provided email address.
|
||||
pub fn validate_email(email: &str) -> CustomResult<(), ValidationError> {
|
||||
#[deny(clippy::invalid_regex)]
|
||||
static EMAIL_REGEX: Lazy<Option<Regex>> = Lazy::new(|| {
|
||||
static EMAIL_REGEX: LazyLock<Option<Regex>> = LazyLock::new(|| {
|
||||
#[allow(unknown_lints)]
|
||||
#[allow(clippy::manual_ok_err)]
|
||||
match Regex::new(
|
||||
|
||||
Reference in New Issue
Block a user