From 7fc40dbb191b48f342501f998e19e3cbf405dfa5 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Mon, 24 Apr 2017 20:03:05 +0100 Subject: [PATCH] ecaps2: Remove extraneous borrowing on base64::encode. --- src/ecaps2.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ecaps2.rs b/src/ecaps2.rs index d9e9a7de..fc9327a3 100644 --- a/src/ecaps2.rs +++ b/src/ecaps2.rs @@ -143,14 +143,14 @@ pub fn hash_ecaps2(data: &[u8], algo: &str) -> String { hasher.input(data); let mut buf: [u8; 32] = [0; 32]; let hash = hasher.variable_result(&mut buf).unwrap(); - base64::encode(&hash) + base64::encode(hash) }, "blake2b-512" => { let mut hasher = Blake2b::default(); hasher.input(data); let mut buf: [u8; 64] = [0; 64]; let hash = hasher.variable_result(&mut buf).unwrap(); - base64::encode(&hash) + base64::encode(hash) }, _ => panic!(), }