mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
refactor(tauri-codegen): panic if local IP address cannot be resolved
This commit is contained in:
@@ -167,9 +167,8 @@ pub fn context_codegen(data: ContextData) -> Result<TokenStream, EmbeddedAssetsE
|
||||
_ => false,
|
||||
};
|
||||
if localhost {
|
||||
if let Ok(ip) = local_ip_address::local_ip() {
|
||||
url.set_host(Some(&ip.to_string())).unwrap();
|
||||
}
|
||||
let ip = local_ip_address::local_ip().expect("failed to resolve local IP address");
|
||||
url.set_host(Some(&ip.to_string())).unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user