Skip to content

Commit 9608b7f

Browse files
authored
Fix clippy warnings (#688)
1 parent 3c3c306 commit 9608b7f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/metrics/exit.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,8 @@ impl Exit for TsxCode {
118118

119119
impl Exit for RustCode {
120120
fn compute(node: &Node, stats: &mut Stats) {
121-
if let Rust::ReturnExpression = node.object().kind_id().into() {
122-
stats.exit += 1;
123-
} else if Self::is_func(node) && node.object().child_by_field_name("return_type").is_some()
121+
if matches!(node.object().kind_id().into(), Rust::ReturnExpression)
122+
|| Self::is_func(node) && node.object().child_by_field_name("return_type").is_some()
124123
{
125124
stats.exit += 1;
126125
}

0 commit comments

Comments
 (0)