diff --git a/packages/cli/src/config/serve.rs b/packages/cli/src/config/serve.rs index a2e0e9d178..22f40a67b0 100644 --- a/packages/cli/src/config/serve.rs +++ b/packages/cli/src/config/serve.rs @@ -4,7 +4,7 @@ use clap::Parser; use std::net::{IpAddr, Ipv4Addr, SocketAddr, SocketAddrV4}; /// The arguments for the address the server will run on -#[derive(Clone, Debug, Parser)] +#[derive(Clone, Debug, Default, Parser)] pub(crate) struct AddressArguments { /// The port the server will run on #[clap(long)] @@ -14,12 +14,3 @@ pub(crate) struct AddressArguments { #[clap(long)] pub(crate) addr: Option, } - -impl Default for AddressArguments { - fn default() -> Self { - Self { - port: None, - addr: None, - } - } -} diff --git a/packages/cli/src/serve/handle.rs b/packages/cli/src/serve/handle.rs index 666627dd84..450fd4238b 100644 --- a/packages/cli/src/serve/handle.rs +++ b/packages/cli/src/serve/handle.rs @@ -467,7 +467,7 @@ impl AppHandle { #[allow(unused)] async fn codesign_ios(&self) -> Result<()> { - const CODESIGN_ERROR: &'static str = r#"This is likely because you haven't + const CODESIGN_ERROR: &str = r#"This is likely because you haven't - Created a provisioning profile before - Accepted the Apple Developer Program License Agreement diff --git a/packages/cli/src/serve/server.rs b/packages/cli/src/serve/server.rs index 5e6a20564a..f9dc96da6e 100644 --- a/packages/cli/src/serve/server.rs +++ b/packages/cli/src/serve/server.rs @@ -75,7 +75,7 @@ impl WebServer { // Use 0.0.0.0 as the default address if none is specified - this will let us expose the // devserver to the network (for other devices like phones/embedded) - let devserver_bind_ip = args.address.addr.unwrap_or_else(|| SELF_IP); + let devserver_bind_ip = args.address.addr.unwrap_or(SELF_IP); // If the user specified a port, use that, otherwise use any available port, preferring 8080 let devserver_port = args