From 24cd81d6847c20dda7d15be9d8fd154c396dbd82 Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Tue, 15 Jun 2021 21:51:26 +0200 Subject: [PATCH] fix some typos --- README.md | 2 +- src/ipext.rs | 4 ++-- src/ipnet.rs | 6 +++--- src/lib.rs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c8d0e8b..1f3a64f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This module provides types and useful methods for working with IPv4 and IPv6 network addresses, commonly called IP prefixes. The new `IpNet`, `Ipv4Net`, and `Ipv6Net` types build on the existing `IpAddr`, `Ipv4Addr`, and `Ipv6Addr` types already provided in Rust's standard library and align to their design to stay consistent. -The module also provides the `IpSubnets`, `Ipv4Subnets`, and `Ipv6Subnets` types for interating over the subnets contained in an IP address range. The `IpAddrRange`, `Ipv4AddrRange`, and `Ipv6AddrRange` types for iterating over IP addresses in a range. And traits that extend `Ipv4Addr` and `Ipv6Addr` with methods for addition, subtraction, bitwise-and, and bitwise-or operations that are missing in Rust's standard library. +The module also provides the `IpSubnets`, `Ipv4Subnets`, and `Ipv6Subnets` types for iterating over the subnets contained in an IP address range. The `IpAddrRange`, `Ipv4AddrRange`, and `Ipv6AddrRange` types for iterating over IP addresses in a range. And traits that extend `Ipv4Addr` and `Ipv6Addr` with methods for addition, subtraction, bitwise-and, and bitwise-or operations that are missing in Rust's standard library. The module only uses stable features so it is guaranteed to compile using the stable toolchain. Tests aim for thorough coverage and can be found in both the test modules and doctests. Please file an [issue on GitHub] if you have any problems, requests, or suggested improvements. diff --git a/src/ipext.rs b/src/ipext.rs index d34f0d4..877ae85 100644 --- a/src/ipext.rs +++ b/src/ipext.rs @@ -479,7 +479,7 @@ impl Iterator for Ipv4AddrRange { let count: u32 = self.end.saturating_sub(self.start); // usize might only be 16 bits, - // so need to explicitely check for overflow. + // so need to explicitly check for overflow. // 'usize::MAX as u32' is okay here - if usize is 64 bits, // value truncates to u32::MAX if count <= std::usize::MAX as u32 { @@ -963,4 +963,4 @@ mod tests { assert_eq!(i3.nth_back(99), None); assert_eq!(i3.next(), None); } -} \ No newline at end of file +} diff --git a/src/ipnet.rs b/src/ipnet.rs index be52701..04eda3a 100644 --- a/src/ipnet.rs +++ b/src/ipnet.rs @@ -1258,7 +1258,7 @@ impl<'a> Contains<&'a Ipv6Addr> for Ipv6Net { /// Generates the subnets between the provided `start` and `end` IP /// addresses inclusive of `end`. Each iteration generates the next /// network address of the largest valid size it can, while using a -/// prefix lenth not less than `min_prefix_len`. +/// prefix length not less than `min_prefix_len`. /// /// # Examples /// @@ -1305,7 +1305,7 @@ pub enum IpSubnets { /// Generates the subnets between the provided `start` and `end` IP /// addresses inclusive of `end`. Each iteration generates the next /// network address of the largest valid size it can, while using a -/// prefix lenth not less than `min_prefix_len`. +/// prefix length not less than `min_prefix_len`. /// /// # Examples /// @@ -1339,7 +1339,7 @@ pub struct Ipv4Subnets { /// Generates the subnets between the provided `start` and `end` IP /// addresses inclusive of `end`. Each iteration generates the next /// network address of the largest valid size it can, while using a -/// prefix lenth not less than `min_prefix_len`. +/// prefix length not less than `min_prefix_len`. /// /// # Examples /// diff --git a/src/lib.rs b/src/lib.rs index fce978c..ad90872 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,7 +9,7 @@ //! consistent. //! //! The module also provides the [`IpSubnets`], [`Ipv4Subnets`], and -//! [`Ipv6Subnets`] types for interating over the subnets contained in +//! [`Ipv6Subnets`] types for iterating over the subnets contained in //! an IP address range. The [`IpAddrRange`], [`Ipv4AddrRange`], and //! [`Ipv6AddrRange`] types for iterating over IP addresses in a range. //! And traits that extend `Ipv4Addr` and `Ipv6Addr` with methods for