Test for Multiple return statements doesnt decrease cognitive complexity

This commit is contained in:
cerdelen 2025-04-11 09:30:28 +02:00
parent da97004e72
commit c7fbcf4c33

View file

@ -448,3 +448,20 @@ mod issue9300 {
}
}
}
#[clippy::cognitive_complexity = "2"]
mod issue14422 {
fn foo() {
for _ in 0..10 {
println!("hello there");
}
}
fn bar() {
for _ in 0..10 {
println!("hello there");
}
return;
return;
}
}