Jeff Vander Stoep | 0029ba4 | 2021-06-25 09:40:28 +0200 | [diff] [blame] | 1 | extern crate base64; |
2 | |||||
3 | use base64::*; | ||||
4 | |||||
5 | pub fn compare_decode(expected: &str, target: &str) { | ||||
6 | assert_eq!( | ||||
7 | expected, | ||||
8 | String::from_utf8(decode(target).unwrap()).unwrap() | ||||
9 | ); | ||||
10 | assert_eq!( | ||||
11 | expected, | ||||
12 | String::from_utf8(decode(target.as_bytes()).unwrap()).unwrap() | ||||
13 | ); | ||||
14 | } |