Skip to content

Commit a23ea84

Browse files
committed
Doc test.
1 parent c4bae0c commit a23ea84

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/sys/socket/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,12 @@ type align_of_cmsg_data = size_t;
202202
///
203203
/// To make room for multiple messages, nest the type parameter with
204204
/// tuples, e.g.
205-
/// `let cmsg: CmsgSpace<([RawFd; 3], CmsgSpace<[RawFd; 2]>)> = CmsgSpace::new();`
205+
///
206+
/// ```
207+
/// use std::os::unix::io::RawFd;
208+
/// use nix::sys::socket::CmsgSpace;
209+
/// let cmsg: CmsgSpace<([RawFd; 3], CmsgSpace<[RawFd; 2]>)> = CmsgSpace::new();
210+
/// ```
206211
#[repr(C)]
207212
pub struct CmsgSpace<T> {
208213
_hdr: cmsghdr,

0 commit comments

Comments
 (0)