File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -29,14 +29,14 @@ impl Handler {
29
29
match self {
30
30
Handler :: Run { run, args } => {
31
31
let mut run = run. clone ( ) ;
32
- for ( key, value) in & with_match. variables {
32
+ for ( key, value) in & with_match. groups {
33
33
run = run. replace ( & format ! ( "$({key})" ) , value) ;
34
34
}
35
35
let args = args
36
36
. iter ( )
37
37
. map ( |a| {
38
38
let mut a = a. clone ( ) ;
39
- for ( key, value) in & with_match. variables {
39
+ for ( key, value) in & with_match. groups {
40
40
a = a. replace ( & format ! ( "$({key})" ) , value) ;
41
41
}
42
42
a
@@ -99,9 +99,9 @@ mod tests {
99
99
100
100
let ( pattern, _) = trigger. paths . iter ( ) . next ( ) . expect ( "Missing path entry" ) ;
101
101
let result = pattern
102
- . match_path ( "/usr/lib/modules/6.6.7-267.current/kernel" )
102
+ . matches ( "/usr/lib/modules/6.6.7-267.current/kernel" )
103
103
. expect ( "Couldn't match path" ) ;
104
- let version = result. variables . get ( "version" ) . expect ( "Missing kernel version" ) ;
104
+ let version = result. groups . get ( "version" ) . expect ( "Missing kernel version" ) ;
105
105
assert_eq ! ( version, "6.6.7-267.current" , "Wrong kernel version match" ) ;
106
106
eprintln ! ( "trigger: {trigger:?}" ) ;
107
107
eprintln ! ( "match: {result:?}" ) ;
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ impl<'a> Collection<'a> {
73
73
let results = paths. into_iter ( ) . flat_map ( |p| {
74
74
self . handlers
75
75
. iter ( )
76
- . filter_map ( move |h| h. pattern . match_path ( & p) . map ( |m| ( h. id . clone ( ) , m, h. handler . clone ( ) ) ) )
76
+ . filter_map ( move |h| h. pattern . matches ( & p) . map ( |m| ( h. id . clone ( ) , m, h. handler . clone ( ) ) ) )
77
77
} ) ;
78
78
self . hits . extend ( results) ;
79
79
}
You can’t perform that action at this time.
0 commit comments