From 7f47949b0974de2aac7d3b1c5773ed3d7724d006 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 28 May 2021 12:11:22 +0100 Subject: [PATCH] Take `self` directly in to_bytes methods where Self: Copy --- src/keys.rs | 2 +- src/note/nullifier.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/keys.rs b/src/keys.rs index e0029478..bcf3c1ef 100644 --- a/src/keys.rs +++ b/src/keys.rs @@ -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() } } diff --git a/src/note/nullifier.rs b/src/note/nullifier.rs index 2ae51c94..2f87148d 100644 --- a/src/note/nullifier.rs +++ b/src/note/nullifier.rs @@ -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() }