fix: format code

This commit is contained in:
YuKun Liu committed 2022-01-18 09:20:36 +08:00
1 parent c737c424b0
commit 5233ee97d9
2 files changed
+7 -9

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ fn main() {
fn app(cx: Scope) -> Element {
cx.render(rsx! (
div {
div {
p {
a {
href: "http://dioxuslabs.com/",
+6 -8
View File
@@ -193,16 +193,14 @@ pub fn launch_with_props<P: 'static + Send>(
if data.is_array() {
let arr = data.as_array().unwrap();
if arr[0].is_object() {
let temp = arr[0]
.as_object()
.unwrap();
let temp = arr[0].as_object().unwrap();
if temp.contains_key("href") {
let url = temp
.get("href").unwrap()
.as_str().unwrap();
let url = temp.get("href").unwrap().as_str().unwrap();
match webbrowser::open(url) {
Ok(_) => {},
Err(e) => log::trace!("Open browser error: {:?}", e),
Ok(_) => {}
Err(e) => {
log::trace!("Open browser error: {:?}", e)
}
}
}
}