Skip to content

Commit 150c3eb

Browse files
refactor: simplify redundant unwrap_or pattern in complexity.rs
Impact: 1 functions changed, 0 affected
1 parent 5d532a6 commit 150c3eb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/codegraph-core/src/complexity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ pub fn compute_all_metrics(
999999
cognitive,
10001000
cyclomatic,
10011001
max_nesting,
1002-
halstead: Some(halstead.unwrap_or(HalsteadMetrics {
1002+
halstead: halstead.or(Some(HalsteadMetrics {
10031003
n1: 0, n2: 0, big_n1: 0, big_n2: 0,
10041004
vocabulary: 0, length: 0,
10051005
volume: 0.0, difficulty: 0.0, effort: 0.0, bugs: 0.0,

0 commit comments

Comments
 (0)