Remove unused IPPubkeyMap::remove method

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
Lee Smet
2023-09-20 17:01:20 +02:00
parent dcabfef13d
commit ebcbd81e07
-9
View File
@@ -31,15 +31,6 @@ impl IpPubkeyMap {
.insert(addr, subnet.prefix_len() as u32, (pk, ss));
}
/// Remove the [`PublicKey`] and [`SharedSecret`] for a given [`Subnet`] from the map.
pub fn remove(&mut self, subnet: Subnet) {
let addr = match subnet.network() {
IpAddr::V6(addr) => addr,
_ => return,
};
self.inner.remove(addr, subnet.prefix_len() as u32);
}
/// Look up the [`PublicKey`] and [`SharedSecret`] associated with an [`IpAddr`], if any is
/// known in the map.
pub fn lookup(&self, addr: Ipv6Addr) -> Option<&(PublicKey, SharedSecret)> {