Rollup merge of #89786 - jkugelman:must-use-len-and-is_empty, r=joshtriplett
Add #[must_use] to len and is_empty Parent issue: #89692 r? `@joshtriplett`
This commit is contained in:
@@ -431,12 +431,14 @@ impl<'a> SocketAncillary<'a> {
|
||||
}
|
||||
|
||||
/// 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
|
||||
|
||||
Reference in New Issue
Block a user