Skip to content

Commit 112fc25

Browse files
committed
Fix clippy warnings
1 parent 3c3c306 commit 112fc25

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎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)