clippy 0.0.51

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

#[macro_use]
extern crate regex;

#[deny(mut_mut)]
#[allow(regex_macro)]
fn main() {
    let pattern = regex!(r"^(?P<level>[#]+)\s(?P<title>.+)$");
    assert!(pattern.is_match("# headline"));
}