fix cargo clippy err

This commit is contained in:
weisd
2024-11-03 10:25:17 +08:00
parent d4a220bddc
commit 2aba454318
4 changed files with 24 additions and 24 deletions
+1 -1
View File
@@ -1797,7 +1797,7 @@ async fn has_space_for(dis: &Vec<Option<DiskInfo>>, size: i64) -> Result<bool> {
}
}
if disks_num < dis.len() / 2 || disks_num <= 0 {
if disks_num < dis.len() / 2 || disks_num == 0 {
return Err(Error::msg(format!(
"not enough online disks to calculate the available space,need {}, found {}",
(dis.len() / 2) + 1,