remove un-needed muts which were causing build warnings/errors

These were introduced in https://boringssl-review.googlesource.com/c/boringssl/+/68748
and detected in our CI which runs against the boringssl
rust bindings at HEAD

Change-Id: I42b37e8738baadffbc0c58e0340144685dd04977
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/69007
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
diff --git a/rust/bssl-crypto/src/digest.rs b/rust/bssl-crypto/src/digest.rs
index 125f427..59d3b2a 100644
--- a/rust/bssl-crypto/src/digest.rs
+++ b/rust/bssl-crypto/src/digest.rs
@@ -62,7 +62,7 @@
     fn update(&mut self, input: &[u8]);
 
     /// Finish the hashing and return the digest.
-    fn digest_to_vec(mut self) -> Vec<u8>;
+    fn digest_to_vec(self) -> Vec<u8>;
 }
 
 /// Trait parameterized by the size of the output of the digest
@@ -70,7 +70,7 @@
 /// this parameter.
 pub trait WithOutputLength<const OUTPUT_LEN: usize> {
     /// Finish the hashing and return the digest.
-    fn digest(mut self) -> [u8; OUTPUT_LEN];
+    fn digest(self) -> [u8; OUTPUT_LEN];
 }
 
 /// The insecure SHA-1 hash algorithm.
diff --git a/rust/bssl-crypto/src/macros.rs b/rust/bssl-crypto/src/macros.rs
index 0d49646..c9e6698 100644
--- a/rust/bssl-crypto/src/macros.rs
+++ b/rust/bssl-crypto/src/macros.rs
@@ -59,7 +59,7 @@
             }
 
             /// Finish the hashing and return the digest.
-            fn digest_to_vec(mut self) -> alloc::vec::Vec<u8> {
+            fn digest_to_vec(self) -> alloc::vec::Vec<u8> {
                 WithOutputLength::<$output_len>::digest(self).to_vec()
             }
         }