Replace option.map(cond) == Some(true) with option.is_some_and(cond)

This commit is contained in:
David Tolnay 2023-11-24 09:06:43 -08:00
parent fec3828c5f
commit b68f5311b5
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82
3 changed files with 3 additions and 3 deletions

View file

@ -108,7 +108,7 @@ fn try_extend_selection(
let node = shallowest_node(&node);
if node.parent().map(|n| list_kinds.contains(&n.kind())) == Some(true) {
if node.parent().is_some_and(|n| list_kinds.contains(&n.kind())) {
if let Some(range) = extend_list_item(&node) {
return Some(range);
}