refactor: use is_none_or instead of map_or (#13035)

This commit is contained in:
Hoa Nguyen
2024-11-30 18:09:49 +07:00
committed by GitHub
parent 5d71150355
commit 0ff2827a79
8 changed files with 9 additions and 9 deletions

View File

@ -112,7 +112,7 @@ impl<T> BlockBatchRecord<T> {
/// Returns the [`BundleRetention`] for the given block based on the configured prune modes.
pub fn bundle_retention(&self, block_number: BlockNumber) -> BundleRetention {
if self.tip.map_or(true, |tip| {
if self.tip.is_none_or(|tip| {
!self
.prune_modes
.account_history