Deduplicate `self.data[..self.len]` expressions
This removes the duplication ensuring single source of truth and making the code simpler.
This commit is contained in:
parent
a1ac3fb311
commit
1d2a1c3fee
|
@ -76,13 +76,13 @@ impl Default for SerializedSignature {
|
|||
|
||||
impl PartialEq for SerializedSignature {
|
||||
fn eq(&self, other: &SerializedSignature) -> bool {
|
||||
self.data[..self.len] == other.data[..other.len]
|
||||
**self == **other
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRef<[u8]> for SerializedSignature {
|
||||
fn as_ref(&self) -> &[u8] {
|
||||
&self.data[..self.len]
|
||||
&*self
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue