diff options
| author | [email protected] <[email protected]> | 2017-12-03 23:37:58 +0100 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2017-12-03 23:37:58 +0100 |
| commit | 9732264b518dac05236121882053f94afece14de (patch) | |
| tree | a5d55b7b12a2baaa76a5868cbdf22b40dfc37195 /openssl | |
| parent | Splitting the sign::Signer::finish function, to avoid allocations (diff) | |
| download | rust-openssl-9732264b518dac05236121882053f94afece14de.tar.xz rust-openssl-9732264b518dac05236121882053f94afece14de.zip | |
Simplifying finish_into
Diffstat (limited to 'openssl')
| -rw-r--r-- | openssl/src/sign.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/openssl/src/sign.rs b/openssl/src/sign.rs index 07df332d..c074de0b 100644 --- a/openssl/src/sign.rs +++ b/openssl/src/sign.rs @@ -158,9 +158,8 @@ impl<'a> Signer<'a> { /// This method will fail if the buffer is not large enough for /// the signature, one can use `finish_len` to get an upper bound /// on the required size. - pub fn finish_into<B:AsMut<[u8]>>(&self, mut buf: B) -> Result<usize, ErrorStack> { + pub fn finish_into(&self, buf: &mut [u8]) -> Result<usize, ErrorStack> { unsafe { - let buf = buf.as_mut(); let mut len = buf.len(); cvt(ffi::EVP_DigestSignFinal( self.md_ctx, |