mirror of
https://gitee.com/openharmony/third_party_rust_rust-base64
synced 2024-12-12 15:37:00 +00:00
15 lines
307 B
Rust
15 lines
307 B
Rust
extern crate base64;
|
|
|
|
use base64::*;
|
|
|
|
pub fn compare_decode(expected: &str, target: &str) {
|
|
assert_eq!(
|
|
expected,
|
|
String::from_utf8(decode(target).unwrap()).unwrap()
|
|
);
|
|
assert_eq!(
|
|
expected,
|
|
String::from_utf8(decode(target.as_bytes()).unwrap()).unwrap()
|
|
);
|
|
}
|