fix: format code
This commit is contained in:
1 parent
c737c424b0
commit
5233ee97d9
2 files changed
+7
-9
No files matched your search
+1
-1
@@ -6,7 +6,7 @@ fn main() {
|
|||||||
|
|
||||||
fn app(cx: Scope) -> Element {
|
fn app(cx: Scope) -> Element {
|
||||||
cx.render(rsx! (
|
cx.render(rsx! (
|
||||||
div {
|
div {
|
||||||
p {
|
p {
|
||||||
a {
|
a {
|
||||||
href: "http://dioxuslabs.com/",
|
href: "http://dioxuslabs.com/",
|
||||||
|
|||||||
@@ -193,16 +193,14 @@ pub fn launch_with_props<P: 'static + Send>(
|
|||||||
if data.is_array() {
|
if data.is_array() {
|
||||||
let arr = data.as_array().unwrap();
|
let arr = data.as_array().unwrap();
|
||||||
if arr[0].is_object() {
|
if arr[0].is_object() {
|
||||||
let temp = arr[0]
|
let temp = arr[0].as_object().unwrap();
|
||||||
.as_object()
|
|
||||||
.unwrap();
|
|
||||||
if temp.contains_key("href") {
|
if temp.contains_key("href") {
|
||||||
let url = temp
|
let url = temp.get("href").unwrap().as_str().unwrap();
|
||||||
.get("href").unwrap()
|
|
||||||
.as_str().unwrap();
|
|
||||||
match webbrowser::open(url) {
|
match webbrowser::open(url) {
|
||||||
Ok(_) => {},
|
Ok(_) => {}
|
||||||
Err(e) => log::trace!("Open browser error: {:?}", e),
|
Err(e) => {
|
||||||
|
log::trace!("Open browser error: {:?}", e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user