Skip to content

Commit bc8b814

Browse files
committed
refactor(tauri-cli): use expect
1 parent b0e7a42 commit bc8b814

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

crates/tauri-cli/src/dev.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,12 +301,10 @@ pub fn setup(interface: &AppInterface, options: &mut Options, config: ConfigHand
301301

302302
if !options.no_dev_server_wait {
303303
if let Some(url) = dev_url {
304-
let host = url
305-
.host()
306-
.unwrap_or_else(|| panic!("No host name in the URL"));
304+
let host = url.host().expect("No host name in the URL");
307305
let port = url
308306
.port_or_known_default()
309-
.unwrap_or_else(|| panic!("No port number in the URL"));
307+
.expect("No port number in the URL");
310308
let addrs;
311309
let addr;
312310
let addrs = match host {

0 commit comments

Comments
 (0)