clippy 0.0.97

A bunch of helpful lints to avoid common pitfalls in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![feature(plugin, custom_attribute)]
#![plugin(clippy)]
#![deny(cyclomatic_complexity)]
#![deny(unused)]

fn main() {
    kaboom();
}

#[cyclomatic_complexity = "0"]
fn kaboom() {  //~ ERROR: the function has a cyclomatic complexity of 3
    if 42 == 43 {
        panic!();
    } else if "cake" == "lie" {
        println!("what?");
    }
}