mirror of
https://github.com/telemt/telemt.git
synced 2026-06-14 23:11:42 +03:00
Rustfmt
This commit is contained in:
@@ -409,7 +409,10 @@ mod tests {
|
||||
response[28..32].copy_from_slice(&[203, 0, 113, 9]);
|
||||
|
||||
let reflected = parse_reflected_addr(&response, &txid).unwrap();
|
||||
assert_eq!(reflected, SocketAddr::new(IpAddr::V4(Ipv4Addr::new(203, 0, 113, 9)), 443));
|
||||
assert_eq!(
|
||||
reflected,
|
||||
SocketAddr::new(IpAddr::V4(Ipv4Addr::new(203, 0, 113, 9)), 443)
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -436,6 +439,9 @@ mod tests {
|
||||
response[28..32].copy_from_slice(&xip);
|
||||
|
||||
let reflected = parse_reflected_addr(&response, &txid).unwrap();
|
||||
assert_eq!(reflected, SocketAddr::new(IpAddr::V4(Ipv4Addr::new(203, 0, 113, 9)), 443));
|
||||
assert_eq!(
|
||||
reflected,
|
||||
SocketAddr::new(IpAddr::V4(Ipv4Addr::new(203, 0, 113, 9)), 443)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,9 +37,7 @@ pub async fn stun_probe(stun_addr: Option<String>) -> Result<crate::network::stu
|
||||
#[allow(dead_code)]
|
||||
pub async fn detect_public_ip() -> Option<IpAddr> {
|
||||
let urls = crate::config::defaults::default_http_ip_detect_urls();
|
||||
detect_public_ipv4_http(&urls)
|
||||
.await
|
||||
.map(IpAddr::V4)
|
||||
detect_public_ipv4_http(&urls).await.map(IpAddr::V4)
|
||||
}
|
||||
|
||||
impl MePool {
|
||||
|
||||
Reference in New Issue
Block a user