fix: format code
This commit is contained in:
1 parent
c737c424b0
commit
5233ee97d9
1 file changed
+6
-8
@@ -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