mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-30 16:39:26 +00:00
08e7ec4047
Co-authored-by: Andy Caldwell <andycaldwell@microsoft.com>
11 lines
193 B
Rust
11 lines
193 B
Rust
fn main() {}
|
|
|
|
#[warn(clippy::cognitive_complexity)]
|
|
fn cognitive_complexity() {
|
|
let x = vec![1, 2, 3];
|
|
for i in x {
|
|
if i == 1 {
|
|
println!("{}", i);
|
|
}
|
|
}
|
|
}
|