diff options
author | Jesse Luehrs <doy@tozt.net> | 2015-03-15 04:45:09 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2015-03-15 04:45:09 -0400 |
commit | 9d88163f2db433b9f31c98a8b3abac8eb17e9d4c (patch) | |
tree | 8f38d77d600f39d38ea813d33647a501ab608bff | |
parent | d65ad9104f08c3d62ee9f5c0a2b7255017170eea (diff) | |
download | matasano-9d88163f2db433b9f31c98a8b3abac8eb17e9d4c.tar.gz matasano-9d88163f2db433b9f31c98a8b3abac8eb17e9d4c.zip |
no reason to do this manually
-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); } |