summaryrefslogtreecommitdiff
path: root/src/sys/socket/mod.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-01-31 16:02:44 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-01-31 16:02:44 +0000
commitebf75050f2f2726808308f76253f27c97aa6db15 (patch)
treef72ecd38d6d4be7cdb929049bdcf9dacf52822c1 /src/sys/socket/mod.rs
parent899eff72f92cbc300fbd7779957907a39aa0e42b (diff)
parent3406b1bd921e71339f975591260b330175e58797 (diff)
downloadnix-ebf75050f2f2726808308f76253f27c97aa6db15.zip
Merge #837
837: More cleanups and enable some more compiler lints r=asomers a=Susurrus Gonna run this through CI and see what breaks on non-Linux-x64 platforms. These changes are minor cleanups, but improve our doc story and should help with future submitted PRs.
Diffstat (limited to 'src/sys/socket/mod.rs')
-rw-r--r--src/sys/socket/mod.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs
index 7c62c739..beef3db8 100644
--- a/src/sys/socket/mod.rs
+++ b/src/sys/socket/mod.rs
@@ -117,7 +117,7 @@ libc_bitflags!{
libc_bitflags!{
/// Flags for send/recv and their relatives
- pub struct MsgFlags: libc::c_int {
+ pub struct MsgFlags: c_int {
/// Sends or requests out-of-band data on sockets that support this notion
/// (e.g., of type [`Stream`](enum.SockType.html)); the underlying protocol must also
/// support out-of-band data.
@@ -320,6 +320,7 @@ cfg_if! {
/// let cmsg: CmsgSpace<([RawFd; 3], CmsgSpace<[RawFd; 2]>)> = CmsgSpace::new();
/// ```
#[repr(C)]
+#[allow(missing_debug_implementations)]
pub struct CmsgSpace<T> {
_hdr: cmsghdr,
_pad: [align_of_cmsg_data; 0],
@@ -335,6 +336,7 @@ impl<T> CmsgSpace<T> {
}
}
+#[allow(missing_debug_implementations)]
pub struct RecvMsg<'a> {
// The number of bytes received.
pub bytes: usize,
@@ -354,6 +356,7 @@ impl<'a> RecvMsg<'a> {
}
}
+#[allow(missing_debug_implementations)]
pub struct CmsgIterator<'a> {
buf: &'a [u8],
next: usize,
@@ -420,6 +423,7 @@ impl<'a> Iterator for CmsgIterator<'a> {
/// A type-safe wrapper around a single control message. More types may
/// be added to this enum; do not exhaustively pattern-match it.
/// [Further reading](http://man7.org/linux/man-pages/man3/cmsg.3.html)
+#[allow(missing_debug_implementations)]
pub enum ControlMessage<'a> {
/// A message of type `SCM_RIGHTS`, containing an array of file
/// descriptors passed between processes.
@@ -501,6 +505,7 @@ pub enum ControlMessage<'a> {
// An opaque structure used to prevent cmsghdr from being a public type
#[doc(hidden)]
+#[allow(missing_debug_implementations)]
pub struct UnknownCmsg<'a>(&'a cmsghdr, &'a [u8]);
// Round `len` up to meet the platform's required alignment for