clippy 0.0.43

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

fn main() {
    format!("foo"); //~ERROR useless use of `format!`
    format!("{}", 42); //~ERROR useless use of `format!`
    format!("{:?}", 42); // we only want to warn about `{}`
    format!("{:+}", 42); // we only want to warn about `{}`
    format!("foo {}", 42);
    format!("{} bar", 42);

    println!("foo");
    println!("foo {}", 42);
}