Skip to content

Conversation

@GuillaumeGomez
Copy link
Member

@frewsxcv
Copy link
Contributor

	error[E0061]: this function takes 0 parameters but 1 parameter was supplied
 --> <anon>:8:19
  |
8 | stream.take_error(100).expect("No error was expected...");
  |                   ^^^ expected 0 parameters
error: aborting due to previous error(s)

/// let stream = TcpStream::connect("127.0.0.1:8080")
/// .expect("Couldn't connect to the server...");
/// stream.set_nodelay(true).expect("set_nodelay call failed");
/// assert_eq!(stream.nodelay().unwrap_or(false), true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only change it if you want to, but instead of doing unwrap_or, you could also:

assert_eq!(stream.nodelay(), Ok(true));

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer this way if you don't mind.

@frewsxcv
Copy link
Contributor

@GuillaumeGomez Up to you if you want to address that comment, otherwise r=me

@GuillaumeGomez
Copy link
Member Author

@bors: r=frewsxcv

@bors
Copy link
Collaborator

bors commented Nov 26, 2016

📌 Commit 56529cd has been approved by frewsxcv

@bors
Copy link
Collaborator

bors commented Nov 26, 2016

⌛ Testing commit 56529cd with merge 9a86579...

bors added a commit that referenced this pull request Nov 26, 2016
Add missing urls and examples to TcpStream

r? @frewsxcv
@bors bors merged commit 56529cd into rust-lang:master Nov 27, 2016
@GuillaumeGomez GuillaumeGomez deleted the tcp_stream_doc branch November 27, 2016 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants