now the method lookup actually works (and I understand why! 😄), reduces unnecessary loops, and has a few comments
This commit is contained in:
parent
c5dfcaeeaf
commit
cdca2c93c1
4 changed files with 98 additions and 27 deletions
11
tests/mut_mut_macro.rs
Normal file
11
tests/mut_mut_macro.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#![feature(plugin)]
|
||||
#![plugin(clippy, regex_macros)]
|
||||
|
||||
extern crate regex;
|
||||
|
||||
#[test]
|
||||
#[deny(mut_mut)]
|
||||
fn test_regex() {
|
||||
let pattern = regex!(r"^(?P<level>[#]+)\s(?P<title>.+)$");
|
||||
assert!(pattern.is_match("# headline"));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue