This repository was archived by the owner on Feb 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,6 @@ impl std::fmt::Display for SyntaxError {
18
18
}
19
19
}
20
20
21
- pub fn parse < ' a > ( selector : & ' a str ) -> Result < Box < dyn Path + ' a > , SyntaxError > {
21
+ pub fn parse ( selector : & str ) -> Result < Box < dyn Path + ' _ > , SyntaxError > {
22
22
parser:: parse ( selector) . map_err ( |m| SyntaxError { message : m } )
23
23
}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ pub trait Matcher {
23
23
pub struct RootSelector { }
24
24
25
25
impl Matcher for RootSelector {
26
- fn select < ' a > ( & ' a self , node : & ' a Value ) -> Iter < ' a > {
26
+ fn select < ' a > ( & self , node : & ' a Value ) -> Iter < ' a > {
27
27
Box :: new ( iter:: once ( node) )
28
28
}
29
29
}
@@ -53,7 +53,7 @@ impl Child {
53
53
}
54
54
55
55
impl Matcher for Child {
56
- fn select < ' a > ( & ' a self , node : & ' a Value ) -> Iter < ' a > {
56
+ fn select < ' a > ( & self , node : & ' a Value ) -> Iter < ' a > {
57
57
Box :: new ( node. get ( & self . name ) . into_iter ( ) )
58
58
}
59
59
}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ use crate::pest::Parser;
12
12
#[ grammar = "grammar.pest" ]
13
13
struct PathParser ;
14
14
15
- pub fn parse < ' a > ( selector : & ' a str ) -> Result < Box < dyn path:: Path + ' a > , String > {
15
+ pub fn parse ( selector : & str ) -> Result < Box < dyn path:: Path + ' _ > , String > {
16
16
let selector_rule = PathParser :: parse ( Rule :: selector, selector)
17
17
. map_err ( |e| format ! ( "{}" , e) ) ?
18
18
. next ( )
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ struct SelectorPath {
19
19
matchers : Vec < Box < dyn matchers:: Matcher > > ,
20
20
}
21
21
22
- pub fn new < ' a > ( matchers : Vec < Box < dyn matchers:: Matcher > > ) -> impl Path + ' a {
22
+ pub fn new ( matchers : Vec < Box < dyn matchers:: Matcher > > ) -> impl Path {
23
23
SelectorPath { matchers }
24
24
}
25
25
You can’t perform that action at this time.
0 commit comments