mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-09-03 01:25:37 +00:00
disallow some methods from itertools
This commit is contained in:
@@ -4,7 +4,6 @@ use crate::proto::utils::RepeatedMessageModel;
|
||||
use anyhow::{anyhow, Error};
|
||||
use hickory_proto::xfer::Protocol;
|
||||
use hickory_resolver::config::{NameServerConfig, NameServerConfigGroup};
|
||||
use itertools::Itertools;
|
||||
use serde_with::{DeserializeFromStr, SerializeDisplay};
|
||||
use std::fmt::{Display, Formatter};
|
||||
use std::net::{IpAddr, SocketAddr};
|
||||
@@ -129,7 +128,7 @@ pub type NameServerAddrGroup = RepeatedMessageModel<NameServerAddr>;
|
||||
|
||||
impl From<NameServerAddrGroup> for NameServerConfigGroup {
|
||||
fn from(value: NameServerAddrGroup) -> Self {
|
||||
value.into_iter().map_into().collect_vec().into()
|
||||
value.into_iter().map(Into::into).collect::<Vec<_>>().into()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,8 +137,8 @@ impl From<NameServerConfigGroup> for NameServerAddrGroup {
|
||||
value
|
||||
.into_inner()
|
||||
.into_iter()
|
||||
.map_into()
|
||||
.collect_vec()
|
||||
.map(Into::into)
|
||||
.collect::<Vec<_>>()
|
||||
.into()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use hickory_proto::rr::LowerName;
|
||||
use idna::AsciiDenyList;
|
||||
use itertools::Itertools;
|
||||
|
||||
pub mod addr;
|
||||
pub mod authority;
|
||||
@@ -24,7 +23,7 @@ pub fn sanitize(name: &str) -> String {
|
||||
.to_string()
|
||||
})
|
||||
.filter(|label| !label.is_empty())
|
||||
.collect_vec()
|
||||
.collect::<Vec<_>>()
|
||||
.join(".");
|
||||
name.truncate(253);
|
||||
if dot {
|
||||
|
||||
Reference in New Issue
Block a user