From 14fdf11a35687889b88c244408a3ad62c2f21729 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Mon, 26 Mar 2018 15:56:52 +0200 Subject: Nicer assert in k_anon test --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index c36ebd6..05dd895 100644 --- a/src/main.rs +++ b/src/main.rs @@ -47,8 +47,9 @@ fn to_k_anon(d: digest::Digest) -> (String, String) { #[test] fn test_k_anon() { let input = digest::digest(&digest::SHA1, "Passw0rd".as_bytes()); - let res = to_k_anon(input); - assert_eq!(res, (String::from("EBFC7"), String::from("910077770C8340F63CD2DCA2AC1F120444F"))); + let (range, rest) = to_k_anon(input); + assert_eq!(&range, "EBFC7"); + assert_eq!(&rest, "910077770C8340F63CD2DCA2AC1F120444F"); } struct Password { -- cgit v1.2.3