mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-12-22 19:31:35 +00:00
Fix hasher test
This commit is contained in:
parent
dc95417846
commit
04bc586a26
1 changed files with 3 additions and 3 deletions
|
@ -89,11 +89,11 @@ mod test {
|
||||||
let hash = test_on_arbiter!(async move {
|
let hash = test_on_arbiter!(async move {
|
||||||
let file1 = tokio::fs::File::open("./client-examples/earth.gif").await?;
|
let file1 = tokio::fs::File::open("./client-examples/earth.gif").await?;
|
||||||
|
|
||||||
let mut hasher = Hasher::new(file1, Sha256::new());
|
let mut reader = Hasher::new(file1, Sha256::new());
|
||||||
|
|
||||||
tokio::io::copy(&mut hasher, &mut tokio::io::sink()).await?;
|
tokio::io::copy(&mut reader, &mut tokio::io::sink()).await?;
|
||||||
|
|
||||||
hasher.finalize_reset().await
|
Ok(reader.hasher().borrow_mut().finalize_reset().to_vec()) as std::io::Result<_>
|
||||||
})
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue