diff options
Diffstat (limited to 'library/std/src/os/unix/net/addr.rs')
| -rw-r--r-- | library/std/src/os/unix/net/addr.rs | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/library/std/src/os/unix/net/addr.rs b/library/std/src/os/unix/net/addr.rs index 887f6059939..f450e41bfea 100644 --- a/library/std/src/os/unix/net/addr.rs +++ b/library/std/src/os/unix/net/addr.rs @@ -159,7 +159,7 @@ impl SocketAddr { #[must_use] #[stable(feature = "unix_socket", since = "1.10.0")] pub fn is_unnamed(&self) -> bool { - if let AddressKind::Unnamed = self.address() { true } else { false } + matches!(self.address(), AddressKind::Unnamed) } /// Returns the contents of this address if it is a `pathname` address. | 
