We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c3c306 commit 9608b7fCopy full SHA for 9608b7f
src/metrics/exit.rs
@@ -118,9 +118,8 @@ impl Exit for TsxCode {
118
119
impl Exit for RustCode {
120
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()
+ if matches!(node.object().kind_id().into(), Rust::ReturnExpression)
+ || Self::is_func(node) && node.object().child_by_field_name("return_type").is_some()
124
{
125
stats.exit += 1;
126
}
0 commit comments