Skip to content

Commit 7dac91d

Browse files
committed
Deprecate capacity and is_empty
These functions always return the same value so are not useful and actually calling them is a red flag.
1 parent 902150c commit 7dac91d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ecdsa/serialized_signature.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ impl SerializedSignature {
8484
}
8585

8686
/// Get the capacity of the underlying data buffer.
87+
#[deprecated = "This always returns 72"]
8788
#[inline]
8889
pub fn capacity(&self) -> usize { self.data.len() }
8990

@@ -106,6 +107,7 @@ impl SerializedSignature {
106107
pub fn from_signature(sig: &Signature) -> SerializedSignature { sig.serialize_der() }
107108

108109
/// Check if the space is zero.
110+
#[deprecated = "This always returns false"]
109111
#[inline]
110112
pub fn is_empty(&self) -> bool { self.len() == 0 }
111113
}

0 commit comments

Comments
 (0)