summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sys/socket/addr.rs3
-rw-r--r--src/sys/socket/mod.rs8
2 files changed, 8 insertions, 3 deletions
diff --git a/src/sys/socket/addr.rs b/src/sys/socket/addr.rs
index b2cafe3c..db62b001 100644
--- a/src/sys/socket/addr.rs
+++ b/src/sys/socket/addr.rs
@@ -497,7 +497,8 @@ impl Eq for Ipv4Addr {
impl hash::Hash for Ipv4Addr {
fn hash<H: hash::Hasher>(&self, s: &mut H) {
- self.0.s_addr.hash(s)
+ let saddr = self.0.s_addr;
+ saddr.hash(s)
}
}
diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs
index c776cf5b..1659bd1e 100644
--- a/src/sys/socket/mod.rs
+++ b/src/sys/socket/mod.rs
@@ -258,9 +258,13 @@ impl Eq for IpMembershipRequest {}
impl fmt::Debug for IpMembershipRequest {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ let mref = &self.0.imr_multiaddr;
+ let maddr = mref.s_addr;
+ let iref = &self.0.imr_interface;
+ let ifaddr = iref.s_addr;
f.debug_struct("IpMembershipRequest")
- .field("imr_multiaddr", &self.0.imr_multiaddr.s_addr)
- .field("imr_interface", &self.0.imr_interface.s_addr)
+ .field("imr_multiaddr", &maddr)
+ .field("imr_interface", &ifaddr)
.finish()
}
}