mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Replace .map_or(false with Option::is_some_and (#33468)
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
236cae9ce5
commit
7df30f3788
51 changed files with 165 additions and 171 deletions
|
@ -620,7 +620,7 @@ pub fn get_element_noopener(subject: &Element, target_attribute_value: Option<DO
|
|||
}
|
||||
let target_is_blank = target_attribute_value
|
||||
.as_ref()
|
||||
.map_or(false, |target| target.to_lowercase() == "_blank");
|
||||
.is_some_and(|target| target.to_lowercase() == "_blank");
|
||||
let link_types = match subject.get_attribute(&ns!(), &local_name!("rel")) {
|
||||
Some(rel) => rel.Value(),
|
||||
None => return target_is_blank,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue