diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-01-31 23:38:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-31 23:38:55 +0100 |
| commit | adc3f8a44b943463577a5f8870da8fd18b749351 (patch) | |
| tree | be5ace1b1ff0e992d755e7e241998e6ef3a5ae5b | |
| parent | 9e0bfe0fb09cdd63660e4fbe0589968ceb9ede0d (diff) | |
| parent | 943f833314575f0e72b3af287258a49d73ee30e0 (diff) | |
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 `?`.
| -rw-r--r-- | library/std/src/net/tcp.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/net/tcp.rs b/library/std/src/net/tcp.rs index 69b72a81c5b..ac09a805975 100644 --- a/library/std/src/net/tcp.rs +++ b/library/std/src/net/tcp.rs @@ -829,7 +829,7 @@ impl TcpListener { /// } /// /// fn main() -> std::io::Result<()> { - /// let listener = TcpListener::bind("127.0.0.1:80").unwrap(); + /// let listener = TcpListener::bind("127.0.0.1:80")?; /// /// for stream in listener.incoming() { /// match stream { |
