Skip to content

Commit 4e87e6f

Browse files
committed
Implement is_empty method
Clippy warns of missing `is_empty`, trivially implement it by calling through to `self.data.is_empty()`.
1 parent 1a818ea commit 4e87e6f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ecdh.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ impl SharedSecret {
6161
self.len
6262
}
6363

64+
/// True if the underlying data buffer is empty.
65+
pub fn is_empty(&self) -> bool {
66+
self.data.is_empty()
67+
}
68+
6469
/// Set the length of the object.
6570
pub(crate) fn set_len(&mut self, len: usize) {
6671
debug_assert!(len <= self.data.len());

0 commit comments

Comments
 (0)