Test for Multiple return statements doesnt decrease cognitive complexity
This commit is contained in:
parent
da97004e72
commit
c7fbcf4c33
1 changed files with 17 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue