summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 0a64486..5288655 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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);
}