diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-17 05:09:51 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-17 05:09:51 +0000 |
commit | e1bb80e8139475f30db541e49d4efb12a6dd8a6e (patch) | |
tree | 176abeb8ca871a94e4016f61dc5f163c23fa0fbe /src/sys/socket/mod.rs | |
parent | f404d9d6f5c40ed48783db9f13dd6b629725f59c (diff) | |
parent | d1395511a653f216f3223c9a64673291ab1a9045 (diff) | |
download | nix-e1bb80e8139475f30db541e49d4efb12a6dd8a6e.zip |
Merge #993
993: Don't reference packed structs. r=asomers a=pusateri
Fixes #992.
Don't merge this yet. I have more testing to do. I just am pushing it up for others.
Co-authored-by: Tom Pusateri <pusateri@bangj.com>
Diffstat (limited to 'src/sys/socket/mod.rs')
-rw-r--r-- | src/sys/socket/mod.rs | 8 |
1 files changed, 6 insertions, 2 deletions
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() } } |