error: the function has a cyclomatic complexity of 28 --> $DIR/cyclomatic_complexity.rs:16:1 | 16 | / fn main() { 17 | | if true { 18 | | println!("a"); 19 | | } ... | 97 | | } 98 | | } | |_^ | = note: `-D clippy::cyclomatic-complexity` implied by `-D warnings` = help: you could split it up into multiple smaller functions error: the function has a cyclomatic complexity of 7 --> $DIR/cyclomatic_complexity.rs:101:1 | 101 | / fn kaboom() { 102 | | let n = 0; 103 | | 'a: for i in 0..20 { 104 | | 'b: for j in i..20 { ... | 119 | | } 120 | | } | |_^ | = help: you could split it up into multiple smaller functions error: the function has a cyclomatic complexity of 1 --> $DIR/cyclomatic_complexity.rs:147:1 | 147 | / fn lots_of_short_circuits() -> bool { 148 | | true && false && true && false && true && false && true 149 | | } | |_^ | = help: you could split it up into multiple smaller functions error: the function has a cyclomatic complexity of 1 --> $DIR/cyclomatic_complexity.rs:152:1 | 152 | / fn lots_of_short_circuits2() -> bool { 153 | | true || false || true || false || true || false || true 154 | | } | |_^ | = help: you could split it up into multiple smaller functions error: the function has a cyclomatic complexity of 2 --> $DIR/cyclomatic_complexity.rs:157:1 | 157 | / fn baa() { 158 | | let x = || match 99 { 159 | | 0 => 0, 160 | | 1 => 1, ... | 171 | | } 172 | | } | |_^ | = help: you could split it up into multiple smaller functions error: the function has a cyclomatic complexity of 2 --> $DIR/cyclomatic_complexity.rs:158:13 | 158 | let x = || match 99 { | _____________^ 159 | | 0 => 0, 160 | | 1 => 1, 161 | | 2 => 2, ... | 165 | | _ => 42, 166 | | }; | |_____^ | = help: you could split it up into multiple smaller functions error: the function has a cyclomatic complexity of 2 --> $DIR/cyclomatic_complexity.rs:175:1 | 175 | / fn bar() { 176 | | match 99 { 177 | | 0 => println!("hi"), 178 | | _ => println!("bye"), 179 | | } 180 | | } | |_^ | = help: you could split it up into multiple smaller functions error: the function has a cyclomatic complexity of 2 --> $DIR/cyclomatic_complexity.rs:194:1 | 194 | / fn barr() { 195 | | match 99 { 196 | | 0 => println!("hi"), 197 | | 1 => println!("bla"), ... | 200 | | } 201 | | } | |_^ | = help: you could split it up into multiple smaller functions error: the function has a cyclomatic complexity of 3 --> $DIR/cyclomatic_complexity.rs:204:1 | 204 | / fn barr2() { 205 | | match 99 { 206 | | 0 => println!("hi"), 207 | | 1 => println!("bla"), ... | 216 | | } 217 | | } | |_^ | = help: you could split it up into multiple smaller functions error: the function has a cyclomatic complexity of 2 --> $DIR/cyclomatic_complexity.rs:220:1 | 220 | / fn barrr() { 221 | | match 99 { 222 | | 0 => println!("hi"), 223 | | 1 => panic!("bla"), ... | 226 | | } 227 | | } | |_^ | = help: you could split it up into multiple smaller functions error: the function has a cyclomatic complexity of 3 --> $DIR/cyclomatic_complexity.rs:230:1 | 230 | / fn barrr2() { 231 | | match 99 { 232 | | 0 => println!("hi"), 233 | | 1 => panic!("bla"), ... | 242 | | } 243 | | } | |_^ | = help: you could split it up into multiple smaller functions error: the function has a cyclomatic complexity of 2 --> $DIR/cyclomatic_complexity.rs:246:1 | 246 | / fn barrrr() { 247 | | match 99 { 248 | | 0 => println!("hi"), 249 | | 1 => println!("bla"), ... | 252 | | } 253 | | } | |_^ | = help: you could split it up into multiple smaller functions error: the function has a cyclomatic complexity of 3 --> $DIR/cyclomatic_complexity.rs:256:1 | 256 | / fn barrrr2() { 257 | | match 99 { 258 | | 0 => println!("hi"), 259 | | 1 => println!("bla"), ... | 268 | | } 269 | | } | |_^ | = help: you could split it up into multiple smaller functions error: the function has a cyclomatic complexity of 2 --> $DIR/cyclomatic_complexity.rs:272:1 | 272 | / fn cake() { 273 | | if 4 == 5 { 274 | | println!("yea"); 275 | | } else { ... | 278 | | println!("whee"); 279 | | } | |_^ | = help: you could split it up into multiple smaller functions error: the function has a cyclomatic complexity of 4 --> $DIR/cyclomatic_complexity.rs:283:1 | 283 | / pub fn read_file(input_path: &str) -> String { 284 | | use std::fs::File; 285 | | use std::io::{Read, Write}; 286 | | use std::path::Path; ... | 308 | | } 309 | | } | |_^ | = help: you could split it up into multiple smaller functions error: the function has a cyclomatic complexity of 1 --> $DIR/cyclomatic_complexity.rs:314:1 | 314 | / fn void(void: Void) { 315 | | if true { 316 | | match void { 317 | | } 318 | | } 319 | | } | |_^ | = help: you could split it up into multiple smaller functions error: the function has a cyclomatic complexity of 1 --> $DIR/cyclomatic_complexity.rs:328:1 | 328 | / fn try() -> Result { 329 | | match 5 { 330 | | 5 => Ok(5), 331 | | _ => return Err("bla"), 332 | | } 333 | | } | |_^ | = help: you could split it up into multiple smaller functions error: the function has a cyclomatic complexity of 1 --> $DIR/cyclomatic_complexity.rs:336:1 | 336 | / fn try_again() -> Result { 337 | | let _ = try!(Ok(42)); 338 | | let _ = try!(Ok(43)); 339 | | let _ = try!(Ok(44)); ... | 348 | | } 349 | | } | |_^ | = help: you could split it up into multiple smaller functions error: the function has a cyclomatic complexity of 1 --> $DIR/cyclomatic_complexity.rs:352:1 | 352 | / fn early() -> Result { 353 | | return Ok(5); 354 | | return Ok(5); 355 | | return Ok(5); ... | 361 | | return Ok(5); 362 | | } | |_^ | = help: you could split it up into multiple smaller functions error: the function has a cyclomatic complexity of 8 --> $DIR/cyclomatic_complexity.rs:366:1 | 366 | / fn early_ret() -> i32 { 367 | | let a = if true { 42 } else { return 0; }; 368 | | let a = if a < 99 { 42 } else { return 0; }; 369 | | let a = if a < 99 { 42 } else { return 0; }; ... | 382 | | } 383 | | } | |_^ | = help: you could split it up into multiple smaller functions error: aborting due to 20 previous errors