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 `?`.
This commit is contained in:
Guillaume Gomez 2023-01-31 23:38:55 +01:00 committed by GitHub
commit adc3f8a44b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {