mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 04:55:22 +03:00
Test for Multiple return statements doesnt decrease cognitive complexity
This commit is contained in:
@@ -448,3 +448,20 @@ pub async fn async_method() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user