mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-25 05:26:50 +00:00
merge getdiskid
This commit is contained in:
@@ -47,7 +47,7 @@ impl Erasure {
|
||||
pub async fn encode<S>(
|
||||
&self,
|
||||
body: S,
|
||||
writers: &mut [FileWriter],
|
||||
writers: &mut [Option<FileWriter>],
|
||||
// block_size: usize,
|
||||
total_size: usize,
|
||||
write_quorum: usize,
|
||||
@@ -85,7 +85,10 @@ impl Erasure {
|
||||
let mut errs = Vec::new();
|
||||
|
||||
for (i, w) in writers.iter_mut().enumerate() {
|
||||
match w.write(blocks[i].as_ref()).await {
|
||||
if w.is_none() {
|
||||
continue;
|
||||
}
|
||||
match w.as_mut().unwrap().write(blocks[i].as_ref()).await {
|
||||
Ok(_) => errs.push(None),
|
||||
Err(e) => errs.push(Some(e)),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user