clippy work
This commit is contained in:
@@ -9,4 +9,4 @@ mod native;
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub use native::*;
|
||||
|
||||
pub static KNOWN_PROTECTED_STORE_KEYS: [&'static str; 2] = ["device_encryption_key", "_test_key"];
|
||||
pub static KNOWN_PROTECTED_STORE_KEYS: [&str; 2] = ["device_encryption_key", "_test_key"];
|
||||
|
||||
@@ -324,7 +324,7 @@ impl PlatformSupportApple {
|
||||
let intf_index = unsafe { (*rt).rtm_index } as u32;
|
||||
|
||||
// Fill in sockaddr table
|
||||
for i in 0..(RTAX_MAX as usize) {
|
||||
(0..(RTAX_MAX as usize)).for_each(|i| {
|
||||
if rtm_addrs & (1 << i) != 0 {
|
||||
sa_tab[i] = sa;
|
||||
sa = unsafe {
|
||||
@@ -333,7 +333,7 @@ impl PlatformSupportApple {
|
||||
sa
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Look for gateways
|
||||
if rtm_addrs & (RTA_DST | RTA_GATEWAY) == (RTA_DST | RTA_GATEWAY) {
|
||||
@@ -373,7 +373,7 @@ impl PlatformSupportApple {
|
||||
}
|
||||
|
||||
fn get_address_flags(ifname: &str, addr: sockaddr_in6) -> EyreResult<AddressFlags> {
|
||||
let mut req = in6_ifreq::from_name(&ifname).unwrap();
|
||||
let mut req = in6_ifreq::from_name(ifname).unwrap();
|
||||
req.set_addr(addr);
|
||||
|
||||
let sock = unsafe { socket(AF_INET6, SOCK_DGRAM, 0) };
|
||||
|
||||
@@ -359,7 +359,7 @@ impl NetworkInterfaces {
|
||||
let old_best_addresses = inner.interface_address_cache.clone();
|
||||
|
||||
// redo the address cache
|
||||
Self::cache_best_addresses(&mut *inner);
|
||||
Self::cache_best_addresses(&mut inner);
|
||||
|
||||
// See if our best addresses have changed
|
||||
if old_best_addresses != inner.interface_address_cache {
|
||||
|
||||
Reference in New Issue
Block a user