refactor: use bool::then

pull/24376/head
Edd Robinson 2021-04-22 22:29:47 +01:00 committed by kodiakhq[bot]
parent 74c25f541d
commit 146b48325b
1 changed files with 3 additions and 4 deletions

View File

@ -127,10 +127,9 @@ impl ChunkSnapshot {
self.records
.iter()
.flat_map(move |(table_name, table_snapshot)| {
match table_snapshot.matches_predicate(&timestamp_range) {
true => Some(table_name),
false => None,
}
table_snapshot
.matches_predicate(&timestamp_range)
.then(|| table_name)
})
}