Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

Commit

Permalink
Replace one-armed match with if let
Browse files Browse the repository at this point in the history
  • Loading branch information
meqif committed Oct 24, 2015
1 parent 145c42e commit 24f562e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1124,9 +1124,8 @@ impl Drop for UtpSocket {
///
/// for connection in listener.incoming() {
/// // Spawn a new handler for each new connection
/// match connection {
/// Ok((socket, _src)) => { thread::spawn(move || { handle_client(socket) }); },
/// _ => ()
/// if let Ok((socket, _src)) = connection {
/// thread::spawn(move || { handle_client(socket) });
/// }
/// }
/// }
Expand Down

0 comments on commit 24f562e

Please sign in to comment.