diff options
author | Nabil Wadih <nwadih@google.com> | 2024-06-04 11:09:00 -0700 |
---|---|---|
committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2024-06-04 20:29:55 +0000 |
commit | a11277e187e407d0ef403b8a60d9a32eaab7d301 (patch) | |
tree | 23c1dac15b21ebfb30f02784d0d16184fb5c7b18 /rust | |
parent | 25cf1bb965ba9ae0302cbc6de4ff4dd6cdbbc016 (diff) | |
download | boringssl-a11277e187e407d0ef403b8a60d9a32eaab7d301.zip boringssl-a11277e187e407d0ef403b8a60d9a32eaab7d301.tar.gz boringssl-a11277e187e407d0ef403b8a60d9a32eaab7d301.tar.bz2 |
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>
Diffstat (limited to 'rust')
-rw-r--r-- | rust/bssl-crypto/src/digest.rs | 4 | ||||
-rw-r--r-- | rust/bssl-crypto/src/macros.rs | 2 |
2 files changed, 3 insertions, 3 deletions
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 @@ pub trait Algorithm { 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 @@ pub trait Algorithm { /// 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 @@ macro_rules! unsafe_iuf_algo { } /// 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() } } |