Explorar o código

remove brackets around address

Evan Almloff %!s(int64=2) %!d(string=hai) anos
pai
achega
b8806b0854

+ 1 - 1
packages/fullstack/examples/axum-hello-world/src/main.rs

@@ -58,7 +58,7 @@ async fn get_server_data() -> Result<String, ServerFnError> {
 }
 
 fn main() {
-    launch!(@[([127, 0, 0, 1], 8080)], app, {
+    launch!(@([127, 0, 0, 1], 8080), app, {
         server_cfg: ServeConfigBuilder::new(app, (AppProps { count: 0 })),
         incremental,
     });

+ 1 - 1
packages/fullstack/examples/axum-router/src/main.rs

@@ -11,7 +11,7 @@ use dioxus_fullstack::prelude::*;
 use dioxus_router::prelude::*;
 
 fn main() {
-    launch_router!(@[([127, 0, 0, 1], 8080)], Route, {
+    launch_router!(@([127, 0, 0, 1], 8080), Route, {
         incremental,
     });
 }

+ 1 - 1
packages/fullstack/examples/salvo-hello-world/src/main.rs

@@ -11,7 +11,7 @@ use dioxus_fullstack::prelude::*;
 use serde::{Deserialize, Serialize};
 
 fn main() {
-    launch!(@[([127, 0, 0, 1], 8080)], app, (AppProps { count: 5 }), {
+    launch!(@([127, 0, 0, 1], 8080), app, (AppProps { count: 5 }), {
         incremental,
     });
 }

+ 1 - 1
packages/fullstack/examples/warp-hello-world/src/main.rs

@@ -11,7 +11,7 @@ use dioxus_fullstack::prelude::*;
 use serde::{Deserialize, Serialize};
 
 fn main() {
-    launch!(@[([127, 0, 0, 1], 8080)], app, (AppProps { count: 5 }), {
+    launch!(@([127, 0, 0, 1], 8080), app, (AppProps { count: 5 }), {
         incremental,
     });
 }

+ 3 - 3
packages/fullstack/src/launch.rs

@@ -11,9 +11,9 @@ macro_rules! launch_router {
         $router_cfg
     };
 
-    (@[$address:expr], $route:ty, $(cfg: $router_cfg:expr,)? {$($rule:ident $(: $cfg:expr)?,)*}) => {
+    (@$address:expr, $route:ty, $(cfg: $router_cfg:expr,)? {$($rule:ident $(: $cfg:expr)?,)*}) => {
         dioxus_fullstack::launch!(
-            @[$address],
+            @$address,
             dioxus_fullstack::router::RouteWithCfg::<$route>,
             (dioxus_fullstack::launch_router!(@router_config $($router_cfg)?)),
             {
@@ -87,7 +87,7 @@ macro_rules! launch {
         $props
     };
 
-    (@[$address:expr], $comp:path, $(( $props:expr ),)? {$($rule:ident $(: $cfg:expr)?,)*}) => {
+    (@ $address:expr, $comp:path, $(( $props:expr ),)? {$($rule:ident $(: $cfg:expr)?,)*}) => {
         #[cfg(feature = "web")]
         {
             #[allow(unused)]