* Simplify some pattern-matches (#16402)
When those match an exact combinator on Option / Result.
Tool-aided by [comby-rust](https://github.com/huitseeker/comby-rust).
(cherry picked from commit b08cff9e77)
# Conflicts:
# accounts-cluster-bench/src/main.rs
# core/src/rpc.rs
# runtime/src/accounts_hash.rs
# runtime/src/message_processor.rs
* Fix conflicts
Co-authored-by: François Garillot <4142+huitseeker@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
This commit is contained in:
@@ -226,10 +226,7 @@ pub fn into_shreds(
|
||||
chunk_index,
|
||||
chunk,
|
||||
..
|
||||
} = match chunks.next() {
|
||||
None => return Err(Error::InvalidDuplicateShreds),
|
||||
Some(chunk) => chunk,
|
||||
};
|
||||
} = chunks.next().ok_or(Error::InvalidDuplicateShreds)?;
|
||||
let slot_leader = leader(slot).ok_or(Error::UnknownSlotLeader)?;
|
||||
let check_chunk = check_chunk(slot, shred_index, shred_type, num_chunks);
|
||||
let mut data = HashMap::new();
|
||||
|
||||
Reference in New Issue
Block a user