Skip to content

Commit 6806394

Browse files
committed
Fix nightly clippy
1 parent e3cb48c commit 6806394

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

bindings-generator/src/api.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,7 @@ impl Api {
3939
}
4040

4141
pub fn find_class(&self, name: &str) -> Option<&GodotClass> {
42-
for class in &self.classes {
43-
if class.name == name {
44-
return Some(class);
45-
}
46-
}
47-
48-
None
42+
self.classes.iter().find(|&class| class.name == name)
4943
}
5044

5145
pub fn class_inherits(&self, class: &GodotClass, base_class_name: &str) -> bool {

0 commit comments

Comments
 (0)