Skip to content

Commit 38c48e2

Browse files
authored
Merge pull request #313 from dskkato/fix/op_code_gen
Fix op-codegen build error
2 parents b78afaf + e3ed04c commit 38c48e2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tensorflow-op-codegen/src/parser.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use nom::error::VerboseError;
2828
use nom::multi::many0;
2929
use nom::multi::many1;
3030
use nom::multi::many_till;
31-
use nom::multi::separated_list;
31+
use nom::multi::separated_list0;
3232
use nom::sequence::delimited;
3333
use nom::sequence::pair;
3434
use nom::sequence::preceded;
@@ -46,12 +46,12 @@ fn merge_protos<M: Message>(ops: Vec<M>) -> Result<M, ProtobufError> {
4646
for op in ops {
4747
op.write_to_vec(&mut out)?;
4848
}
49-
protobuf::parse_from_bytes(&out)
49+
Message::parse_from_bytes(&out)
5050
}
5151

5252
type ParseResult<'a, O> = IResult<&'a [u8], O, VerboseError<&'a [u8]>>;
5353

54-
fn space<'a>() -> impl Fn(&'a [u8]) -> ParseResult<'a, ()> {
54+
fn space<'a>() -> impl FnMut(&'a [u8]) -> ParseResult<'a, ()> {
5555
map(many0(one_of(" \t\r\n")), |_| ())
5656
}
5757

@@ -260,12 +260,12 @@ where
260260
}
261261
}
262262

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>
264264
where
265265
M: Message,
266-
F: Fn(&'a [u8]) -> ParseResult<'a, M>,
266+
F: FnMut(&'a [u8]) -> ParseResult<'a, M>,
267267
{
268-
map_res(separated_list(space(), field), merge_protos)
268+
map_res(separated_list0(space(), field), merge_protos)
269269
}
270270

271271
fn tensor_shape_proto_dim<'a>(input: &'a [u8]) -> ParseResult<'a, TensorShapeProto_Dim> {

0 commit comments

Comments
 (0)