@@ -144,15 +144,15 @@ fn string_literal<'a, E: ParseError<&'a str>>(input: &'a str) -> IResult<&'a str
144144 Ok ( ( input, content) )
145145}
146146
147- fn first_string_literal_property ( i : & str ) -> IResult < & str , PropexSegment , nom:: error:: Error < & str > > {
147+ fn first_string_literal_property ( i : & str ) -> IResult < & str , PropexSegment < ' _ > , nom:: error:: Error < & str > > {
148148 token ( string_literal) . map ( |x| PropexSegment :: Property ( Cow :: Borrowed ( x) ) ) . parse ( i)
149149}
150150
151- fn first_direct_property ( i : & str ) -> IResult < & str , PropexSegment , nom:: error:: Error < & str > > {
151+ fn first_direct_property ( i : & str ) -> IResult < & str , PropexSegment < ' _ > , nom:: error:: Error < & str > > {
152152 nom_parsers:: js_identifier. map ( |x| PropexSegment :: Property ( Cow :: Borrowed ( x) ) ) . parse ( i)
153153}
154154
155- fn first_property ( i : & str ) -> IResult < & str , PropexSegment , nom:: error:: Error < & str > > {
155+ fn first_property ( i : & str ) -> IResult < & str , PropexSegment < ' _ > , nom:: error:: Error < & str > > {
156156 context (
157157 "first_property" ,
158158 alt ( (
@@ -167,25 +167,25 @@ fn first_property(i: &str) -> IResult<&str, PropexSegment, nom::error::Error<&st
167167}
168168
169169/// `['prop']` or `["prop"]`
170- fn quoted_index_property ( i : & str ) -> IResult < & str , PropexSegment , nom:: error:: Error < & str > > {
170+ fn quoted_index_property ( i : & str ) -> IResult < & str , PropexSegment < ' _ > , nom:: error:: Error < & str > > {
171171 delimited ( token ( char ( '[' ) ) , string_literal, token ( char ( ']' ) ) )
172172 . map ( |x| PropexSegment :: Property ( Cow :: Borrowed ( x) ) )
173173 . parse ( i)
174174}
175175
176176/// `.property`
177- fn direct_identifier_property ( i : & str ) -> IResult < & str , PropexSegment , nom:: error:: Error < & str > > {
177+ fn direct_identifier_property ( i : & str ) -> IResult < & str , PropexSegment < ' _ > , nom:: error:: Error < & str > > {
178178 context ( "direct_property" , preceded ( char ( '.' ) , nom_parsers:: js_identifier) )
179179 . map ( |x : & str | PropexSegment :: Property ( Cow :: Borrowed ( x) ) )
180180 . parse ( i)
181181}
182182
183183/// `.123`
184- fn direct_numbers_index ( i : & str ) -> IResult < & str , PropexSegment , nom:: error:: Error < & str > > {
184+ fn direct_numbers_index ( i : & str ) -> IResult < & str , PropexSegment < ' _ > , nom:: error:: Error < & str > > {
185185 context ( "direct_numbers_index" , preceded ( token ( char ( '.' ) ) , token ( parse_usize) ) ) . map ( PropexSegment :: Index ) . parse ( i)
186186}
187187
188- fn subproperty ( i : & str ) -> IResult < & str , PropexSegment , nom:: error:: Error < & str > > {
188+ fn subproperty ( i : & str ) -> IResult < & str , PropexSegment < ' _ > , nom:: error:: Error < & str > > {
189189 context (
190190 "subproperty" ,
191191 alt ( (
@@ -199,13 +199,13 @@ fn subproperty(i: &str) -> IResult<&str, PropexSegment, nom::error::Error<&str>>
199199 . parse ( i)
200200}
201201
202- fn bracket_index ( i : & str ) -> IResult < & str , PropexSegment , nom:: error:: Error < & str > > {
202+ fn bracket_index ( i : & str ) -> IResult < & str , PropexSegment < ' _ > , nom:: error:: Error < & str > > {
203203 context ( "index" , delimited ( token ( char ( '[' ) ) , token ( parse_usize) , token ( char ( ']' ) ) ) )
204204 . map ( PropexSegment :: Index )
205205 . parse ( i)
206206}
207207
208- fn nested ( i : & str ) -> IResult < & str , PropexSegment , nom:: error:: Error < & str > > {
208+ fn nested ( i : & str ) -> IResult < & str , PropexSegment < ' _ > , nom:: error:: Error < & str > > {
209209 let ( i, _) = token ( char ( '[' ) ) . parse ( i) ?;
210210 let ( i, first) = first_direct_property. parse ( i) ?;
211211 let ( i, rest) = many1 ( subproperty) . parse ( i) ?;
@@ -216,7 +216,7 @@ fn nested(i: &str) -> IResult<&str, PropexSegment, nom::error::Error<&str>> {
216216 Ok ( ( i, PropexSegment :: Nested ( result) ) )
217217}
218218
219- fn expression ( input : & str ) -> IResult < & str , PropexPath , nom:: error:: Error < & str > > {
219+ fn expression ( input : & str ) -> IResult < & str , PropexPath < ' _ > , nom:: error:: Error < & str > > {
220220 let ( input, first) = first_property. parse ( input) ?;
221221
222222 let ( input, rest) = context (
@@ -238,7 +238,7 @@ fn expression(input: &str) -> IResult<&str, PropexPath, nom::error::Error<&str>>
238238 }
239239}
240240
241- pub fn parse ( expr : & str ) -> Result < PropexPath , PropexError > {
241+ pub fn parse ( expr : & str ) -> Result < PropexPath < ' _ > , PropexError > {
242242 if expr. is_empty ( ) {
243243 return Err ( PropexError :: BadArguments ) ;
244244 }
0 commit comments