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

@ -335,7 +335,7 @@ pub fn shared_capability_offsets(
// highest wins, others are ignored
if shared_capabilities
.get(&peer_capability.name)
.map_or(true, |v| peer_capability.version > v.version)
.is_none_or(|v| peer_capability.version > v.version)
{
shared_capabilities.insert(
peer_capability.name.clone(),