Rollup merge of #79732 - matthiaskrgr:cl12ppy, r=Dylan-DPC
minor stylistic clippy cleanups simplify if let Some(_) = x to if x.is_some() (clippy::redundant_pattern_matching) don't create owned values for comparison (clippy::cmp_owned) use .contains() or .any() instead of find(x).is_some() (clippy::search_is_some) don't wrap code block in Ok() (clipppy::unit_arg)
This commit is contained in:
commit
d95948c6d3
5 changed files with 10 additions and 9 deletions
|
|
@ -391,7 +391,7 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for LinkReplacer<'a, I> {
|
|||
_,
|
||||
))) => {
|
||||
debug!("saw end of shortcut link to {}", dest);
|
||||
if self.links.iter().find(|&link| *link.href == **dest).is_some() {
|
||||
if self.links.iter().any(|link| *link.href == **dest) {
|
||||
assert!(self.shortcut_link.is_some(), "saw closing link without opening tag");
|
||||
self.shortcut_link = None;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue