From 5ed7f1b652cec221e6ed3308dd617ed72a0bdadb Mon Sep 17 00:00:00 2001 From: Avril Date: Thu, 13 May 2021 01:24:43 +0100 Subject: [PATCH] fix unneeded trait bounds --- Cargo.toml | 2 +- src/sha256.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7c88fba..4d66928 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cryptohelpers" -version = "1.7.2" +version = "1.7.3" license= "MIT" description = "Collection of helpers and simplifying functions for cryptography things" authors = ["Avril "] diff --git a/src/sha256.rs b/src/sha256.rs index c3fd0c0..50b8ecd 100644 --- a/src/sha256.rs +++ b/src/sha256.rs @@ -65,8 +65,8 @@ impl Sha256Hash } /// Reads the rest of the stream, and computes SHA256 hash into the current instance. Returning the number of bytes read. - pub fn compute_into_sync(&mut self, from: &mut T) -> io::Result - where T: io::Read + Unpin + ?Sized + pub fn compute_into_sync(&mut self, mut from: T) -> io::Result + where T: io::Read { let mut buffer = [0u8; super::BUFFER_SIZE]; let mut hasher = Sha256::new(); @@ -184,8 +184,8 @@ where I: IntoIterator, /// Compute the SHA256 hash of the rest of this stream -pub fn compute_sync(from: &mut T) -> io::Result -where T: io::Read + Unpin + ?Sized +pub fn compute_sync(mut from: T) -> io::Result +where T: io::Read { let mut buffer = [0u8; super::BUFFER_SIZE]; let mut hasher = Sha256::new();