mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-16 22:16:53 +00:00
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:
commit
adc3f8a44b
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user