Skip to content

Commit dd27d09

Browse files
committed
verify: Use matches macro
Use `matches!` instead of matching manually. Found by clippy.
1 parent 1f71c59 commit dd27d09

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

verify/src/versioned.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,7 @@ pub fn requires_type(version: Version, method_name: &str) -> Result<bool> {
7575
))),
7676
};
7777

78-
let requires = match method.ret {
79-
Some(Return::Type(_)) => true,
80-
_ => false,
81-
};
82-
Ok(requires)
78+
Ok(matches!(method.ret, Some(Return::Type(_))))
8379
}
8480

8581
/// Checks that a type exists in version specific module.

0 commit comments

Comments
 (0)