]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/os/unix/net/ancillary.rs
Rollup merge of #89786 - jkugelman:must-use-len-and-is_empty, r=joshtriplett
[rust.git] / library / std / src / os / unix / net / ancillary.rs
index 57bb61903c147964c6d74b08ed6ba788e1c075cb..353bf2f11665ab520409a081b2e31001c6eb7e56 100644 (file)
@@ -431,12 +431,14 @@ pub fn capacity(&self) -> usize {
     }
 
     /// Returns `true` if the ancillary data is empty.
+    #[must_use]
     #[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
     pub fn is_empty(&self) -> bool {
         self.length == 0
     }
 
     /// Returns the number of used bytes.
+    #[must_use]
     #[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
     pub fn len(&self) -> usize {
         self.length