diff options
author | Richard Walters <rwalters@digitalstirling.com> | 2020-10-30 18:49:54 -0700 |
---|---|---|
committer | Richard Walters <rwalters@digitalstirling.com> | 2020-10-30 18:49:54 -0700 |
commit | 98d33f8dd784238eb3319eb5461afe4ed26ea216 (patch) | |
tree | 245a1b96371ef6670095c9b9aed21a09b12a908a /src/validate_ipv4_address.rs | |
parent | 9d961981db81d10a7315160fbcb45b1ebaf4c119 (diff) |
Fix new warnings from latest Rust tools
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)] |