fix: format code
This commit is contained in:
1 parent
c737c424b0
commit
5233ee97d9
2 files changed
+7
-9
No files matched your search
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user