Add missing main() and return value
This commit is contained in:
parent
cdfb5cb4bf
commit
be18a22765
1 changed files with 5 additions and 2 deletions
|
|
@ -415,8 +415,11 @@ impl UnixStream {
|
|||
/// use std::os::unix::net::UnixStream;
|
||||
/// use std::time::Duration;
|
||||
///
|
||||
/// let socket = UnixStream::connect("/tmp/sock")?;
|
||||
/// socket.set_read_timeout(Some(Duration::new(1, 0))).expect("Couldn't set read timeout");
|
||||
/// fn main() -> std::io::Result<()> {
|
||||
/// let socket = UnixStream::connect("/tmp/sock")?;
|
||||
/// socket.set_read_timeout(Some(Duration::new(1, 0))).expect("Couldn't set read timeout");
|
||||
/// Ok(())
|
||||
/// }
|
||||
/// ```
|
||||
///
|
||||
/// An [`Err`] is returned if the zero [`Duration`] is passed to this
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue