This repository has been archived by the owner. It is now read-only.

Add examples in doc #26

Merged
merged 1 commit into from Jun 25, 2016

Conversation

Projects
None yet
2 participants
@GuillaumeGomez
Contributor

GuillaumeGomez commented Jun 24, 2016

No description provided.

@GuillaumeGomez GuillaumeGomez force-pushed the GuillaumeGomez:docs branch 2 times, most recently from 131b7b0 to c3f79bb Jun 24, 2016

/// use unix_socket::UnixStream;
///
/// let stream = UnixStream::connect("/path/to/my/socket").unwrap();
/// println!("{}", match stream.read_timeout() {

This comment has been minimized.

@sfackler

sfackler Jun 25, 2016

Member

The examples seem to be inconsistent as to whether they panic or match on the result.

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Jun 25, 2016

Contributor

I match when I want to print.

src/lib.rs Outdated
/// use unix_socket::UnixStream;
///
/// let stream = UnixStream::connect("/path/to/my/socket").unwrap();
/// stream.set_nonblocking(false).unwrap();

This comment has been minimized.

@sfackler

sfackler Jun 25, 2016

Member

I'd change false to true here since sockets are blocking by default.

This comment has been minimized.

@GuillaumeGomez

@GuillaumeGomez GuillaumeGomez force-pushed the GuillaumeGomez:docs branch from c3f79bb to e2ed2ab Jun 25, 2016

@sfackler sfackler merged commit 8b282e1 into rust-lang-nursery:master Jun 25, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@sfackler

This comment has been minimized.

Member

sfackler commented Jun 25, 2016

Thanks!

@GuillaumeGomez GuillaumeGomez deleted the GuillaumeGomez:docs branch Jun 25, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.