Skip to content

Commit 825493b

Browse files
committed
Small code improvements.
1 parent a4ccab7 commit 825493b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@ impl SerializedSignature {
247247
pub fn from_signature(sig: &Signature) -> SerializedSignature {
248248
sig.serialize_der()
249249
}
250+
251+
/// Check if the space is zero.
252+
pub fn is_empty(&self) -> bool { self.len() == 0 }
250253
}
251254

252255
impl Signature {
@@ -548,7 +551,7 @@ impl Default for SerializedSignature {
548551

549552
impl PartialEq for SerializedSignature {
550553
fn eq(&self, other: &SerializedSignature) -> bool {
551-
&self.data[..self.len] == &other.data[..other.len]
554+
self.data[..self.len] == other.data[..other.len]
552555
}
553556
}
554557

0 commit comments

Comments
 (0)