Skip to content

Commit

Permalink
ipV4: unncessary check
Browse files Browse the repository at this point in the history
  • Loading branch information
nbittich committed Nov 24, 2024
1 parent 081391a commit ba44b34
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/iri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@ fn parse_ip_v4(s: &str) -> ParserResult<Vec<u8>> {
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)
Expand Down

0 comments on commit ba44b34

Please sign in to comment.