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).
This commit is contained in:
committed by
GitHub
parent
bb9d2fd07a
commit
b08cff9e77
@@ -747,8 +747,10 @@ mod test {
|
||||
let num_epoch_slots = crds
|
||||
.table
|
||||
.values()
|
||||
.filter(|value| value.insert_timestamp >= since)
|
||||
.filter(|value| matches!(value.value.data, CrdsData::EpochSlots(_, _)))
|
||||
.filter(|value| {
|
||||
value.insert_timestamp >= since
|
||||
&& matches!(value.value.data, CrdsData::EpochSlots(_, _))
|
||||
})
|
||||
.count();
|
||||
assert_eq!(num_epoch_slots, crds.get_epoch_slots_since(since).count());
|
||||
for value in crds.get_epoch_slots_since(since) {
|
||||
|
||||
Reference in New Issue
Block a user