diff src/th06/ecl.rs @ 755:fc937d93a57c

Bump nom to version 6, and image to 0.23.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Mon, 04 Jan 2021 21:14:02 +0100
parents 414f8611f344
children
line wrap: on
line diff
--- a/src/th06/ecl.rs
+++ b/src/th06/ecl.rs
@@ -331,7 +331,7 @@ fn parse_sub_instruction(input: &[u8]) -
     let i = &input[..];
     let (i, (time, opcode)) = tuple((le_i32, le_u16))(i)?;
     if time == -1 || opcode == 0xffff {
-        return Err(Err::Error((i, ErrorKind::Eof)));
+        return Err(Err::Error(nom::error::Error::new(i, ErrorKind::Eof)));
     }
 
     let (i, (size, rank_mask, param_mask)) = tuple((le_u16, le_u16, le_u16))(i)?;
@@ -352,7 +352,7 @@ fn parse_main_instruction(input: &[u8]) 
     let i = &input[..];
     let (i, (time, sub)) = tuple((le_u16, le_u16))(i)?;
     if time == 0xffff && sub == 4 {
-        return Err(Err::Error((i, ErrorKind::Eof)));
+        return Err(Err::Error(nom::error::Error::new(i, ErrorKind::Eof)));
     }
 
     let (i, (opcode, size)) = tuple((le_u16, le_u16))(i)?;
@@ -377,7 +377,7 @@ fn parse_ecl(input: &[u8]) -> IResult<&[
 
     if main_count != 0 {
         // TODO: use a better error.
-        return Err(Err::Error((i, ErrorKind::Eof)));
+        return Err(Err::Error(nom::error::Error::new(i, ErrorKind::Eof)));
     }
 
     let (_, (main_offsets, sub_offsets)) = tuple((