From ef81d2901aa6070ea57deb8ee13338120677d5ae Mon Sep 17 00:00:00 2001 From: Dennis Schwerdel Date: Wed, 17 Jun 2020 16:21:21 +0200 Subject: [PATCH] Typos in comments --- src/ip.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ip.rs b/src/ip.rs index a94136e..2c2db3d 100644 --- a/src/ip.rs +++ b/src/ip.rs @@ -83,13 +83,13 @@ impl RoutingTable { impl Table for RoutingTable { /// Learns the given address, inserting it in the hash map fn learn(&mut self, addr: Address, prefix_len: Option, address: SocketAddr) { - // If prefix length is not set, treat the whole addess as significant + // If prefix length is not set, treat the whole address as significant let prefix_len = match prefix_len { Some(val) => val, None => addr.len * 8 }; info!("New routing entry: {}/{} => {}", addr, prefix_len, addr_nice(address)); - // Round the prefix length down to the next multiple of 8 and extraxt a prefix of that + // Round the prefix length down to the next multiple of 8 and extract a prefix of that // length. let group_len = prefix_len as usize / 8; assert!(group_len <= 16); @@ -97,7 +97,7 @@ impl Table for RoutingTable { group_bytes[..group_len].copy_from_slice(&addr.data[..group_len]); // Create an entry let routing_entry = RoutingEntry { address, bytes: addr, prefix_len }; - // Add the entry to the routing table, creating a new list of the prefix group is empty. + // Add the entry to the routing table, creating a new list if the prefix group is empty. match self.0.entry(group_bytes) { hash_map::Entry::Occupied(mut entry) => entry.get_mut().push(routing_entry), hash_map::Entry::Vacant(entry) => {