diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -4,9 +4,6 @@ use serialize::base64::{ToBase64,STANDARD}; use serialize::hex::FromHex; pub fn hex_to_base64 (hex: &str) -> String { - let bytes = match hex.from_hex() { - Ok(b) => b, - Err(e) => panic!("{}", e), - }; + let bytes = hex.from_hex().unwrap(); return bytes.to_base64(STANDARD); } |