Take `self` directly in to_bytes methods where Self: Copy

This commit is contained in:
Jack Grigg 2021-05-28 12:11:22 +01:00
parent cdfd2ab0f9
commit 7f47949b09
2 changed files with 2 additions and 2 deletions

View File

@ -421,7 +421,7 @@ impl DiversifiedTransmissionKey {
}
/// $repr_P(self)$
pub(crate) fn to_bytes(&self) -> [u8; 32] {
pub(crate) fn to_bytes(self) -> [u8; 32] {
self.0.to_bytes()
}
}

View File

@ -37,7 +37,7 @@ impl Nullifier {
}
/// Serialize the nullifier to its canonical byte representation.
pub fn to_bytes(&self) -> [u8; 32] {
pub fn to_bytes(self) -> [u8; 32] {
self.0.to_bytes()
}