try not double boxing

This commit is contained in:
Evan Almloff committed 2024-01-17 15:07:45 -06:00
1 parent 0c532c5e0c
commit dab87c0144
11 files changed
+166 -103

No files matched your search

+1 -4
View File
@@ -99,10 +99,7 @@ mod rehydrate;
/// wasm_bindgen_futures::spawn_local(app_fut);
/// }
/// ```
pub async fn run_with_props<Props: Clone + 'static>(
dioxus_config: CrossPlatformConfig<Props>,
web_config: Config,
) {
pub async fn run_with_props(dioxus_config: CrossPlatformConfig, web_config: Config) {
tracing::info!("Starting up");
let mut dom = dioxus_config.build_vdom();
+2 -2
View File
@@ -5,10 +5,10 @@ use crate::Config;
/// The web renderer platform
pub struct WebPlatform;
impl<Props: Clone + 'static> PlatformBuilder<Props> for WebPlatform {
impl PlatformBuilder for WebPlatform {
type Config = Config;
fn launch(config: CrossPlatformConfig<Props>, platform_config: Self::Config) {
fn launch(config: CrossPlatformConfig, platform_config: Self::Config) {
wasm_bindgen_futures::spawn_local(async move {
crate::run_with_props(config, platform_config).await;
});