diff options
Diffstat (limited to 'src/validate_ipv4_address.rs')
-rw-r--r-- | src/validate_ipv4_address.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/validate_ipv4_address.rs b/src/validate_ipv4_address.rs index 3c524ce..3c0b739 100644 --- a/src/validate_ipv4_address.rs +++ b/src/validate_ipv4_address.rs @@ -101,11 +101,7 @@ pub fn validate_ipv4_address<T>(address: T) -> Result<(), Error> where T: AsRef<str>, { - address - .as_ref() - .chars() - .try_fold(State::new(), |machine, c| machine.next(c))? - .finalize() + address.as_ref().chars().try_fold(State::new(), State::next)?.finalize() } #[cfg(test)] |