Fix cargo clippy issues
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-08-28 08:05:22 +02:00
parent cd4b8af445
commit a1e23efd99
8 changed files with 110 additions and 114 deletions

View File

@@ -104,10 +104,10 @@ impl Token {
/// Check whether a token is expired or not
pub fn is_expired(&self) -> bool {
if let Some(max_inactivity) = self.max_inactivity {
if max_inactivity + self.last_used < time() {
return true;
}
if let Some(max_inactivity) = self.max_inactivity
&& max_inactivity + self.last_used < time()
{
return true;
}
false
@@ -188,10 +188,10 @@ impl NewToken {
return Some(err);
}
if let Some(t) = self.max_inactivity {
if t < 3600 {
return Some("API tokens shall be valid for at least 1 hour!");
}
if let Some(t) = self.max_inactivity
&& t < 3600
{
return Some("API tokens shall be valid for at least 1 hour!");
}
None