From ba44b34080f9d3a65a255bb19114b64acb587455 Mon Sep 17 00:00:00 2001 From: Nordine Bittich Date: Mon, 25 Nov 2024 00:24:20 +0100 Subject: [PATCH] ipV4: unncessary check --- src/iri.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/iri.rs b/src/iri.rs index aaedbfb..567a49b 100644 --- a/src/iri.rs +++ b/src/iri.rs @@ -73,10 +73,7 @@ fn parse_ip_v4(s: &str) -> ParserResult> { verify( separated_list1( tag("."), - verify( - map_parser(take_while1(|c: char| c.is_numeric()), all_consuming(U8)), - |num: &u8| num <= &255, - ), + map_parser(take_while1(|c: char| c.is_numeric()), all_consuming(U8)), ), |list: &[u8]| list.len() == 4, )(s)