fix clippy

Signed-off-by: junxiang Mu <1948535941@qq.com>
This commit is contained in:
junxiang Mu
2024-10-12 14:09:52 +08:00
parent adef6476ec
commit a0e37098bb
37 changed files with 322 additions and 384 deletions
+4 -4
View File
@@ -63,7 +63,7 @@ impl Versioning {
pub fn validate(&self) -> Result<()> {
match self.status {
State::Suspended => {
if self.excluded_prefixes.len() > 0 {
if !self.excluded_prefixes.is_empty() {
return Err(Error::new(VersioningErr::ExcludedPrefixNotSupported));
}
}
@@ -103,7 +103,7 @@ impl Versioning {
return false;
}
}
return true;
true
}
pub fn suspended(&self) -> bool {
@@ -131,10 +131,10 @@ impl Versioning {
}
}
}
return false;
false
}
pub fn prefixes_excluded(&self) -> bool {
self.excluded_prefixes.len() > 0 || self.exclude_folders
!self.excluded_prefixes.is_empty() || self.exclude_folders
}
}