cargo fmt
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user