Skip to content

Commit

Permalink
Fix tests due to revert
Browse files Browse the repository at this point in the history
  • Loading branch information
malept committed Dec 20, 2018
1 parent d89cf27 commit 59fb5a8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/imp/commoncrypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use std::io;
/// use crypto_hash::{Algorithm, Hasher};
/// use std::io::Write;
///
/// let mut hasher = Hasher::new(&Algorithm::SHA256);
/// let mut hasher = Hasher::new(Algorithm::SHA256);
/// hasher.write_all(b"crypto");
/// hasher.write_all(b"-");
/// hasher.write_all(b"hash");
Expand Down
2 changes: 1 addition & 1 deletion src/imp/cryptoapi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const SHA512_LENGTH: usize = 64;
/// use crypto_hash::{Algorithm, Hasher};
/// use std::io::Write;
///
/// let mut hasher = Hasher::new(&Algorithm::SHA256);
/// let mut hasher = Hasher::new(Algorithm::SHA256);
/// hasher.write_all(b"crypto");
/// hasher.write_all(b"-");
/// hasher.write_all(b"hash");
Expand Down
2 changes: 1 addition & 1 deletion src/imp/openssl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use std::io;
/// use crypto_hash::{Algorithm, Hasher};
/// use std::io::Write;
///
/// let mut hasher = Hasher::new(&Algorithm::SHA256);
/// let mut hasher = Hasher::new(Algorithm::SHA256);
/// hasher.write_all(b"crypto");
/// hasher.write_all(b"-");
/// hasher.write_all(b"hash");
Expand Down
4 changes: 2 additions & 2 deletions src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ fn sha512_empty_string() {

#[test]
fn hasher_sans_write() {
let mut hasher = Hasher::new(&Algorithm::MD5);
let mut hasher = Hasher::new(Algorithm::MD5);
let actual = hex::encode(hasher.finish());
assert_eq!(MD5_EMPTY_STRING, actual)
}

#[test]
fn hasher_with_write() {
let mut hasher = Hasher::new(&Algorithm::MD5);
let mut hasher = Hasher::new(Algorithm::MD5);
hasher
.write_all(TO_HASH.as_bytes())
.expect("Could not write to hasher");
Expand Down

0 comments on commit 59fb5a8

Please sign in to comment.