From ffb70bde0a3085a7fdd359ec30284213ec349fe8 Mon Sep 17 00:00:00 2001 From: Astro Date: Fri, 30 Oct 2020 15:04:14 +0100 Subject: [PATCH] command_parser: fix input_remain match --- src/command_parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command_parser.rs b/src/command_parser.rs index 3352d17..8cc7aa4 100644 --- a/src/command_parser.rs +++ b/src/command_parser.rs @@ -465,7 +465,7 @@ fn command(input: &[u8]) -> IResult<&[u8], Result> { impl Command { pub fn parse(input: &[u8]) -> Result { match command(input) { - Ok((b"", result)) => + Ok((input_remain, result)) if input_remain.len() == 0 => result, Ok((input_remain, _)) => Err(Error::UnexpectedInput(input_remain[0])),