fix unneeded trait bounds

tokio-1.0
Avril 3 years ago
parent 41c0945bea
commit 5ed7f1b652
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -1,6 +1,6 @@
[package] [package]
name = "cryptohelpers" name = "cryptohelpers"
version = "1.7.2" version = "1.7.3"
license= "MIT" license= "MIT"
description = "Collection of helpers and simplifying functions for cryptography things" description = "Collection of helpers and simplifying functions for cryptography things"
authors = ["Avril <flanchan@cumallover.me>"] authors = ["Avril <flanchan@cumallover.me>"]

@ -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. /// 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<T>(&mut self, from: &mut T) -> io::Result<usize> pub fn compute_into_sync<T>(&mut self, mut from: T) -> io::Result<usize>
where T: io::Read + Unpin + ?Sized where T: io::Read
{ {
let mut buffer = [0u8; super::BUFFER_SIZE]; let mut buffer = [0u8; super::BUFFER_SIZE];
let mut hasher = Sha256::new(); let mut hasher = Sha256::new();
@ -184,8 +184,8 @@ where I: IntoIterator<Item=T>,
/// Compute the SHA256 hash of the rest of this stream /// Compute the SHA256 hash of the rest of this stream
pub fn compute_sync<T>(from: &mut T) -> io::Result<Sha256Hash> pub fn compute_sync<T>(mut from: T) -> io::Result<Sha256Hash>
where T: io::Read + Unpin + ?Sized where T: io::Read
{ {
let mut buffer = [0u8; super::BUFFER_SIZE]; let mut buffer = [0u8; super::BUFFER_SIZE];
let mut hasher = Sha256::new(); let mut hasher = Sha256::new();

Loading…
Cancel
Save