Skip to content

Commit 0848deb

Browse files
authored
assert_eq -> nom verify
1 parent dd35ca9 commit 0848deb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

crates/signum/src/chsets/printer.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,9 @@ pub fn parse_char(input: &[u8]) -> IResult<&[u8], PSetChar> {
187187
let (input, top) = u8(input)?;
188188
let (input, height) = u8(input)?;
189189
let (input, width) = u8(input)?;
190-
let (input, _d) = u8(input)?;
191-
assert_eq!(_d, 0);
190+
/// FIXME: Are there any valid files where this is non-zero?
191+
let (input, _d) = verify(u8, |x| *x == 0)(input)?;
192+
192193
let len = (width as usize) * (height as usize);
193194
let (input, bitmap) = take(len)(input)?;
194195
let input = if len % 2 == 1 { &input[1..] } else { input };

0 commit comments

Comments
 (0)