Simplify gen_name function
Signed-off-by: Tomasz Boguszewski <tomekboguszewski1@gmail.com>
This commit is contained in:
		
							parent
							
								
									582e025145
								
							
						
					
					
						commit
						6372c96722
					
				| @ -4,10 +4,8 @@ use hbb_common::ResultType; | |||||||
| use license::*; | use license::*; | ||||||
| 
 | 
 | ||||||
| fn gen_name(lic: &License) -> ResultType<String> { | fn gen_name(lic: &License) -> ResultType<String> { | ||||||
|     let tmp = serde_json::to_vec::<License>(lic)?; |     let tmp = URL_SAFE_NO_PAD.encode(&serde_json::to_vec(lic)?); | ||||||
|     let tmp = URL_SAFE_NO_PAD.encode(&tmp); |     Ok(tmp.chars().rev().collect()) | ||||||
|     let tmp: String = tmp.chars().rev().collect(); |  | ||||||
|     Ok(tmp) |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| fn main() { | fn main() { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user