aboutsummaryrefslogtreecommitdiff
path: root/src/validate_ipv4_address.rs
diff options
context:
space:
mode:
authorRichard Walters <rwalters@digitalstirling.com>2020-10-30 18:49:54 -0700
committerRichard Walters <rwalters@digitalstirling.com>2020-10-30 18:49:54 -0700
commit98d33f8dd784238eb3319eb5461afe4ed26ea216 (patch)
tree245a1b96371ef6670095c9b9aed21a09b12a908a /src/validate_ipv4_address.rs
parent9d961981db81d10a7315160fbcb45b1ebaf4c119 (diff)
Fix new warnings from latest Rust tools
Diffstat (limited to 'src/validate_ipv4_address.rs')
-rw-r--r--src/validate_ipv4_address.rs6
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)]