more clippy lints
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
@ -64,10 +64,8 @@ impl CachedUserInfo {
|
||||
return false;
|
||||
}
|
||||
if let Some(expire) = info.expire {
|
||||
if expire > 0 {
|
||||
if expire <= now() {
|
||||
return false;
|
||||
}
|
||||
if expire > 0 && expire <= now() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -289,8 +289,12 @@ impl Interface {
|
||||
|
||||
if let Some(method6) = self.method6 {
|
||||
let mut skip_v6 = false; // avoid empty inet6 manual entry
|
||||
if self.method.is_some() && method6 == NetworkConfigMethod::Manual {
|
||||
if self.comments6.is_none() && self.options6.is_empty() { skip_v6 = true; }
|
||||
if self.method.is_some()
|
||||
&& method6 == NetworkConfigMethod::Manual
|
||||
&& self.comments6.is_none()
|
||||
&& self.options6.is_empty()
|
||||
{
|
||||
skip_v6 = true;
|
||||
}
|
||||
|
||||
if !skip_v6 {
|
||||
|
@ -10,7 +10,7 @@ use regex::Regex;
|
||||
|
||||
use proxmox::*; // for IP macros
|
||||
|
||||
pub static IPV4_REVERSE_MASK: &[&'static str] = &[
|
||||
pub static IPV4_REVERSE_MASK: &[&str] = &[
|
||||
"0.0.0.0",
|
||||
"128.0.0.0",
|
||||
"192.0.0.0",
|
||||
|
Reference in New Issue
Block a user