@@ -28,7 +28,7 @@ use nom::error::VerboseError;
28
28
use nom:: multi:: many0;
29
29
use nom:: multi:: many1;
30
30
use nom:: multi:: many_till;
31
- use nom:: multi:: separated_list ;
31
+ use nom:: multi:: separated_list0 ;
32
32
use nom:: sequence:: delimited;
33
33
use nom:: sequence:: pair;
34
34
use nom:: sequence:: preceded;
@@ -46,12 +46,12 @@ fn merge_protos<M: Message>(ops: Vec<M>) -> Result<M, ProtobufError> {
46
46
for op in ops {
47
47
op. write_to_vec ( & mut out) ?;
48
48
}
49
- protobuf :: parse_from_bytes ( & out)
49
+ Message :: parse_from_bytes ( & out)
50
50
}
51
51
52
52
type ParseResult < ' a , O > = IResult < & ' a [ u8 ] , O , VerboseError < & ' a [ u8 ] > > ;
53
53
54
- fn space < ' a > ( ) -> impl Fn ( & ' a [ u8 ] ) -> ParseResult < ' a , ( ) > {
54
+ fn space < ' a > ( ) -> impl FnMut ( & ' a [ u8 ] ) -> ParseResult < ' a , ( ) > {
55
55
map ( many0 ( one_of ( " \t \r \n " ) ) , |_| ( ) )
56
56
}
57
57
@@ -260,12 +260,12 @@ where
260
260
}
261
261
}
262
262
263
- fn message < ' a , M , F > ( field : F ) -> impl Fn ( & ' a [ u8 ] ) -> ParseResult < ' a , M >
263
+ fn message < ' a , M , F > ( field : F ) -> impl FnMut ( & ' a [ u8 ] ) -> ParseResult < ' a , M >
264
264
where
265
265
M : Message ,
266
- F : Fn ( & ' a [ u8 ] ) -> ParseResult < ' a , M > ,
266
+ F : FnMut ( & ' a [ u8 ] ) -> ParseResult < ' a , M > ,
267
267
{
268
- map_res ( separated_list ( space ( ) , field) , merge_protos)
268
+ map_res ( separated_list0 ( space ( ) , field) , merge_protos)
269
269
}
270
270
271
271
fn tensor_shape_proto_dim < ' a > ( input : & ' a [ u8 ] ) -> ParseResult < ' a , TensorShapeProto_Dim > {
0 commit comments