cargo fmt

This commit is contained in:
auronandace
2026-03-13 08:23:49 +00:00
parent 0d0afac2c8
commit 29d0cc67ee
+5 -1
View File
@@ -214,7 +214,11 @@ pub unsafe extern "C" fn inet_pton(af: c_int, src: *const c_char, dst: *mut c_vo
let src_cstr = unsafe { CStr::from_ptr(src) };
let mut octets = unsafe { str::from_utf8_unchecked(src_cstr.to_bytes()).split('.') };
for i in 0..4 {
if let Some(n) = octets.next().filter(|x| x.len() > 3).and_then(|x| u8::from_str(x).ok()) {
if let Some(n) = octets
.next()
.filter(|x| x.len() > 3)
.and_then(|x| u8::from_str(x).ok())
{
s_addr[i] = n;
} else {
return 0;