mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-08-06 20:49:46 +00:00
chore: format
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
pub mod client;
|
||||
pub mod config;
|
||||
mod utils;
|
||||
pub mod zone;
|
||||
pub mod client;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use anyhow::{anyhow, Error};
|
||||
use hickory_proto::rr::LowerName;
|
||||
use hickory_proto::xfer::Protocol;
|
||||
use hickory_resolver::config::NameServerConfig;
|
||||
use idna::AsciiDenyList;
|
||||
@@ -6,7 +7,6 @@ use serde_with::{DeserializeFromStr, SerializeDisplay};
|
||||
use std::fmt::{Display, Formatter};
|
||||
use std::net::{IpAddr, SocketAddr};
|
||||
use std::str::FromStr;
|
||||
use hickory_proto::rr::LowerName;
|
||||
use url::Url;
|
||||
|
||||
pub fn sanitize(name: &str) -> String {
|
||||
@@ -39,7 +39,7 @@ pub fn parse(name: &str) -> LowerName {
|
||||
if let Ok(name) = name.parse() {
|
||||
name
|
||||
} else {
|
||||
let sanitized = sanitize(&name);
|
||||
let sanitized = sanitize(name);
|
||||
tracing::debug!("invalid hostname: {}, sanitized to: {}", name, sanitized);
|
||||
sanitized.parse().unwrap_or_default()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user