style: code style

This commit is contained in:
2020-11-07 23:43:15 +08:00
parent 939861e987
commit 8bc89e80bb

View File

@@ -70,7 +70,7 @@ async fn main() {
result.insert("status", "400".to_owned()); result.insert("status", "400".to_owned());
result.insert("message", "Script verify failed!".to_owned()); result.insert("message", "Script verify failed!".to_owned());
result.insert("js_hash", format!("{}", js_hex)); result.insert("js_hash", format!("{}", js_hex));
return serde_json::to_string_pretty(&result).unwrap() return serde_json::to_string_pretty(&result).unwrap();
} }
let context = QuickJSContext::new().unwrap(); let context = QuickJSContext::new().unwrap();
@@ -92,7 +92,7 @@ async fn main() {
result.insert("result", r.into_string().unwrap_or_else(|| "null".to_owned())); result.insert("result", r.into_string().unwrap_or_else(|| "null".to_owned()));
}, },
} }
return serde_json::to_string_pretty(&result).unwrap() serde_json::to_string_pretty(&result).unwrap()
}); });
println!("Listen at 127.0.0.1:8888 ..."); println!("Listen at 127.0.0.1:8888 ...");