mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-31 09:18:28 +00:00
fix can_decode num count
This commit is contained in:
@@ -588,7 +588,7 @@ impl ShardReader {
|
|||||||
fn can_decode(&self, bufs: &[Option<Vec<u8>>]) -> bool {
|
fn can_decode(&self, bufs: &[Option<Vec<u8>>]) -> bool {
|
||||||
let c = bufs.iter().filter(|v| v.is_some()).count();
|
let c = bufs.iter().filter(|v| v.is_some()).count();
|
||||||
if self.parity_block_count > 0 {
|
if self.parity_block_count > 0 {
|
||||||
c > self.data_block_count
|
c >= self.data_block_count
|
||||||
} else {
|
} else {
|
||||||
c == self.data_block_count
|
c == self.data_block_count
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user