Skip to content

Commit 1d2a1c3

Browse files
committed
Deduplicate self.data[..self.len] expressions
This removes the duplication ensuring single source of truth and making the code simpler.
1 parent a1ac3fb commit 1d2a1c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ecdsa/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ impl Default for SerializedSignature {
7676

7777
impl PartialEq for SerializedSignature {
7878
fn eq(&self, other: &SerializedSignature) -> bool {
79-
self.data[..self.len] == other.data[..other.len]
79+
**self == **other
8080
}
8181
}
8282

8383
impl AsRef<[u8]> for SerializedSignature {
8484
fn as_ref(&self) -> &[u8] {
85-
&self.data[..self.len]
85+
&*self
8686
}
8787
}
8888

0 commit comments

Comments
 (0)