Skip to content

Commit b836b28

Browse files
authored
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.
2 parents a3deca4 + 76aa929 commit b836b28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/net/tcp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ impl TcpStream {
405405
/// use std::net::TcpStream;
406406
///
407407
/// let stream = TcpStream::connect("127.0.0.1:8000")
408-
/// .expect("couldn't bind to address");
408+
/// .expect("Couldn't connect to the server...");
409409
/// let mut buf = [0; 10];
410410
/// let len = stream.peek(&mut buf).expect("peek failed");
411411
/// ```

0 commit comments

Comments
 (0)