[librsvg: 11/19] Replace find() followed by is_some() with any()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 11/19] Replace find() followed by is_some() with any()
- Date: Fri, 21 Aug 2020 18:30:17 +0000 (UTC)
commit 5c03f490ffa8ab24813ce847148da628979289c0
Author: Sven Neumann <sven svenfoo org>
Date: Fri Aug 21 00:13:32 2020 +0200
Replace find() followed by is_some() with any()
See https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some
rsvg_internals/src/document.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/rsvg_internals/src/document.rs b/rsvg_internals/src/document.rs
index eebb5c02e..b57197c05 100644
--- a/rsvg_internals/src/document.rs
+++ b/rsvg_internals/src/document.rs
@@ -352,7 +352,7 @@ impl NodeStack {
}
pub fn contains(&self, node: &Node) -> bool {
- self.0.iter().find(|n| **n == *node).is_some()
+ self.0.iter().any(|n| *n == *node)
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]