@@ -28,7 +28,7 @@ use self::parse_state::ParseState;
2828macro_rules! type_id {
2929 ( $( #[ $meta: meta] ) * $name: ident, $tag: literal) => {
3030 $( #[ $meta] ) *
31- fn $name<' a, E >( input: ParseState <' a>) -> IResult <ParseState , ParseState , E >
31+ fn $name<' a, E >( input: ParseState <' a>) -> IResult <ParseState < ' a> , ParseState < ' a> , E >
3232 where
3333 E : ParseError <ParseState <' a>> + ContextError <ParseState <' a>>
3434 {
@@ -40,7 +40,7 @@ macro_rules! type_id {
4040
4141 ( $( #[ $meta: meta] ) * $name: ident, $( $tag: literal ) ,+) => {
4242 $( #[ $meta] ) *
43- fn $name<' a, E >( input: ParseState <' a>) -> IResult <ParseState , ParseState , E >
43+ fn $name<' a, E >( input: ParseState <' a>) -> IResult <ParseState < ' a> , ParseState < ' a> , E >
4444 where
4545 E : ParseError <ParseState <' a>> + ContextError <ParseState <' a>>
4646 {
@@ -107,7 +107,7 @@ type_id!(
107107) ;
108108
109109/// Reads any type ID which may appear as a leaf in the resource tree.
110- fn type_id_no_root < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState , ParseState , E >
110+ fn type_id_no_root < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState < ' a > , ParseState < ' a > , E >
111111where
112112 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
113113{
@@ -132,7 +132,7 @@ where
132132/// It is presently unclear which characters appear in keys in practice, so in
133133/// the interest of a simplified parse, only characters which have been
134134/// encountered in real files are supported.
135- fn invariant_chars < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState , ParseState , E >
135+ fn invariant_chars < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState < ' a > , ParseState < ' a > , E >
136136where
137137 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
138138{
@@ -143,7 +143,7 @@ where
143143}
144144
145145/// Reads a single-line comment up to but not including the final newline.
146- fn eol_comment < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState , ParseState , E >
146+ fn eol_comment < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState < ' a > , ParseState < ' a > , E >
147147where
148148 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
149149{
@@ -153,7 +153,7 @@ where
153153/// Reads a multi-line comment.
154154///
155155/// Does not support nested comments.
156- fn delimited_comment < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState , ParseState , E >
156+ fn delimited_comment < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState < ' a > , ParseState < ' a > , E >
157157where
158158 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
159159{
@@ -164,7 +164,7 @@ where
164164}
165165
166166/// Reads one single-line or multi-line comment.
167- fn comment < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState , ParseState , E >
167+ fn comment < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState < ' a > , ParseState < ' a > , E >
168168where
169169 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
170170{
@@ -186,7 +186,7 @@ where
186186/// for these has also been omitted for the time being.
187187///
188188/// See [`Reader`] for more details on the specification.
189- fn string < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState , & str , E >
189+ fn string < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState < ' a > , & ' a str , E >
190190where
191191 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
192192{
@@ -203,15 +203,15 @@ where
203203}
204204
205205/// Reads a signed or unsigned 32-bit integer.
206- fn integer < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState , u32 , E >
206+ fn integer < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState < ' a > , u32 , E >
207207where
208208 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
209209{
210210 context ( "integer" , token ( alt ( ( u32, map ( i32, |value| value as u32 ) ) ) ) ) ( input)
211211}
212212
213213/// Reads and discards any number of comments and any amount of whitespace.
214- fn discardable < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState , ( ) , E >
214+ fn discardable < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState < ' a > , ( ) , E >
215215where
216216 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
217217{
@@ -220,7 +220,7 @@ where
220220
221221/// Reads a single token as specified by the provided parser, surrounded by any
222222/// number of comments and any amount of whitespace.
223- fn token < ' a , F , O , E > ( mut parser : F ) -> impl FnMut ( ParseState < ' a > ) -> IResult < ParseState , O , E >
223+ fn token < ' a , F , O , E > ( mut parser : F ) -> impl FnMut ( ParseState < ' a > ) -> IResult < ParseState < ' a > , O , E >
224224where
225225 F : Parser < ParseState < ' a > , O , E > ,
226226 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
@@ -237,7 +237,7 @@ where
237237/// Generates appropriate matchers for simple string tokens.
238238macro_rules! simple_token {
239239 ( $name: ident, $str: expr) => {
240- fn $name<' a, E >( input: ParseState <' a>) -> IResult <ParseState , ParseState , E >
240+ fn $name<' a, E >( input: ParseState <' a>) -> IResult <ParseState < ' a> , ParseState < ' a> , E >
241241 where
242242 E : ParseError <ParseState <' a>> + ContextError <ParseState <' a>>,
243243 {
@@ -251,7 +251,7 @@ simple_token!(right_brace, "}");
251251simple_token ! ( comma, "," ) ;
252252
253253/// Reads a table key.
254- fn key < ' a , E > ( state : ParseState < ' a > ) -> IResult < ParseState , Key , E >
254+ fn key < ' a , E > ( state : ParseState < ' a > ) -> IResult < ParseState < ' a > , Key < ' a > , E >
255255where
256256 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
257257{
@@ -277,7 +277,7 @@ where
277277}
278278
279279/// Reads a single table entry, consisting of a key and an associated resource.
280- fn table_entry < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState , ( Key , Resource ) , E >
280+ fn table_entry < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState < ' a > , ( Key < ' a > , Resource < ' a > ) , E >
281281where
282282 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
283283{
@@ -308,7 +308,7 @@ macro_rules! resource_opt_tag {
308308
309309/// Reads the body of a table resource, consisting of any number of key-resource
310310/// pair entries.
311- fn table_body < ' a , E > ( state : ParseState < ' a > ) -> IResult < ParseState , Table , E >
311+ fn table_body < ' a , E > ( state : ParseState < ' a > ) -> IResult < ParseState < ' a > , Table < ' a > , E >
312312where
313313 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
314314{
@@ -327,7 +327,7 @@ where
327327///
328328/// Though it is not required in the resource bundle text, the final in-memory
329329/// representation sorts these pairs lexically by key.
330- fn table_resource < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState , Resource , E >
330+ fn table_resource < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState < ' a > , Resource < ' a > , E >
331331where
332332 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
333333{
@@ -338,7 +338,9 @@ where
338338}
339339
340340/// Reads the root table resource, noting whether locale fallback is disabled.
341- fn root_table_resource < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState , ( bool , Resource ) , E >
341+ fn root_table_resource < ' a , E > (
342+ input : ParseState < ' a > ,
343+ ) -> IResult < ParseState < ' a > , ( bool , Resource < ' a > ) , E >
342344where
343345 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
344346{
@@ -357,7 +359,7 @@ where
357359
358360/// Reads an array resource consisting of any number of hetereogeneously-typed
359361/// resources, optionally separated by commas.
360- fn array_resource < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState , Resource , E >
362+ fn array_resource < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState < ' a > , Resource < ' a > , E >
361363where
362364 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
363365{
@@ -379,7 +381,7 @@ where
379381/// These integers have no inherent signedness; consumers specify whether a
380382/// signed or unsigned integer is desired. Because of this, note that 28-bit
381383/// integers require special handling in-memory. See [`Int28`] for more details.
382- fn int_resource < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState , Resource , E >
384+ fn int_resource < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState < ' a > , Resource < ' a > , E >
383385where
384386 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
385387{
@@ -393,7 +395,7 @@ where
393395
394396/// Reads an integer vector resource, consisting of any number of 32-bit
395397/// integers separated by commas. A trailing comma is optional.
396- fn int_vector_resource < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState , Resource , E >
398+ fn int_vector_resource < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState < ' a > , Resource < ' a > , E >
397399where
398400 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
399401{
@@ -424,7 +426,7 @@ fn binary_byte(input: &str) -> IResult<&str, u8> {
424426/// digits representing byte values.
425427///
426428/// See [`binary_byte`].
427- fn binary_resource < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState , Resource , E >
429+ fn binary_resource < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState < ' a > , Resource < ' a > , E >
428430where
429431 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
430432{
@@ -450,7 +452,7 @@ where
450452/// braces.
451453///
452454/// See [`string`] for more details on the representation of strings.
453- fn string_resource < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState , Resource , E >
455+ fn string_resource < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState < ' a > , Resource < ' a > , E >
454456where
455457 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
456458{
@@ -464,7 +466,7 @@ where
464466}
465467
466468/// Reads a single resource.
467- fn resource < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState , Resource , E >
469+ fn resource < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState < ' a > , Resource < ' a > , E >
468470where
469471 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
470472{
@@ -482,7 +484,7 @@ where
482484}
483485
484486/// Reads a complete resource bundle.
485- fn bundle < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState , ResourceBundle , E >
487+ fn bundle < ' a , E > ( input : ParseState < ' a > ) -> IResult < ParseState < ' a > , ResourceBundle < ' a > , E >
486488where
487489 E : ParseError < ParseState < ' a > > + ContextError < ParseState < ' a > > ,
488490{
0 commit comments