Skip to content

Commit adc3f8a

Browse files
Rollup merge of #107535 - dcompoze:tcp-doc-unwrap, r=cuviper
Replace unwrap with ? in TcpListener doc The example in TcpListener doc returns `std::io::Result<()>` but the code inside the function uses `unwrap()` instead of `?`.
2 parents 9e0bfe0 + 943f833 commit adc3f8a

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
@@ -829,7 +829,7 @@ impl TcpListener {
829829
/// }
830830
///
831831
/// fn main() -> std::io::Result<()> {
832-
/// let listener = TcpListener::bind("127.0.0.1:80").unwrap();
832+
/// let listener = TcpListener::bind("127.0.0.1:80")?;
833833
///
834834
/// for stream in listener.incoming() {
835835
/// match stream {

0 commit comments

Comments
 (0)