Rollup merge of #93531 - TheColdVoid:patch-1, r=m-ou-se

Fix incorrect panic message in example

The panic message when calling the `connect()` should probably be a  message about connection failure, not a message about binding address failure.
This commit is contained in:
Matthias Krüger 2022-02-02 07:11:07 +01:00 committed by GitHub
commit b836b281a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -405,7 +405,7 @@ impl TcpStream {
/// use std::net::TcpStream;
///
/// let stream = TcpStream::connect("127.0.0.1:8000")
/// .expect("couldn't bind to address");
/// .expect("Couldn't connect to the server...");
/// let mut buf = [0; 10];
/// let len = stream.peek(&mut buf).expect("peek failed");
/// ```