diff --git a/src/naming.rs b/src/naming.rs index 53e675d92..d805ee462 100644 --- a/src/naming.rs +++ b/src/naming.rs @@ -4,10 +4,8 @@ use hbb_common::ResultType; use license::*; fn gen_name(lic: &License) -> ResultType { - let tmp = serde_json::to_vec::(lic)?; - let tmp = URL_SAFE_NO_PAD.encode(&tmp); - let tmp: String = tmp.chars().rev().collect(); - Ok(tmp) + let tmp = URL_SAFE_NO_PAD.encode(&serde_json::to_vec(lic)?); + Ok(tmp.chars().rev().collect()) } fn main() {