Add #[must_use] to is_condition tests

A continuation of #89718.
This commit is contained in:
John Kugelman
2021-10-11 21:15:57 -04:00
parent 7cc8c44871
commit 01b439e764
6 changed files with 47 additions and 0 deletions

View File

@@ -156,6 +156,7 @@ impl SocketAddr {
/// Ok(())
/// }
/// ```
#[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 }