From 79514de053dd7c8d0a2dbca65c1d5ce8605400b3 Mon Sep 17 00:00:00 2001 From: Niklas Eicker Date: Sat, 16 Dec 2023 22:15:46 +0100 Subject: [PATCH] Format --- integrations/actix/src/lib.rs | 15 +++++++++++---- integrations/axum/src/lib.rs | 15 +++++++++++---- integrations/viz/src/lib.rs | 15 +++++++++++---- router/src/extract_routes.rs | 6 +++--- 4 files changed, 36 insertions(+), 15 deletions(-) diff --git a/integrations/actix/src/lib.rs b/integrations/actix/src/lib.rs index 3e3a173349..7b41d156c6 100644 --- a/integrations/actix/src/lib.rs +++ b/integrations/actix/src/lib.rs @@ -923,10 +923,14 @@ pub fn generate_route_list_with_exclusions_and_ssg( app_fn: impl Fn() -> IV + 'static + Clone, excluded_routes: Option>, ) -> (Vec, StaticDataMap) - where - IV: IntoView + 'static, +where + IV: IntoView + 'static, { - generate_route_list_with_exclusions_and_ssg_and_context(app_fn, excluded_routes, || {}) + generate_route_list_with_exclusions_and_ssg_and_context( + app_fn, + excluded_routes, + || {}, + ) } /// Generates a list of all routes defined in Leptos's Router in your app. We can then use this to automatically @@ -943,7 +947,10 @@ where IV: IntoView + 'static, { let (mut routes, static_data_map) = - leptos_router::generate_route_list_inner_with_context(app_fn, additional_context); + leptos_router::generate_route_list_inner_with_context( + app_fn, + additional_context, + ); // Actix's Router doesn't follow Leptos's // Match `*` or `*someword` to replace with replace it with "/{tail.*} diff --git a/integrations/axum/src/lib.rs b/integrations/axum/src/lib.rs index e0fb2d81d2..24eede3ad3 100644 --- a/integrations/axum/src/lib.rs +++ b/integrations/axum/src/lib.rs @@ -1364,10 +1364,14 @@ pub fn generate_route_list_with_exclusions_and_ssg( app_fn: impl Fn() -> IV + 'static + Clone, excluded_routes: Option>, ) -> (Vec, StaticDataMap) - where - IV: IntoView + 'static, +where + IV: IntoView + 'static, { - generate_route_list_with_exclusions_and_ssg_and_context(app_fn, excluded_routes, || {}) + generate_route_list_with_exclusions_and_ssg_and_context( + app_fn, + excluded_routes, + || {}, + ) } /// Generates a list of all routes defined in Leptos's Router in your app. We can then use this to automatically @@ -1385,7 +1389,10 @@ where IV: IntoView + 'static, { let (routes, static_data_map) = - leptos_router::generate_route_list_inner_with_context(app_fn, additional_context); + leptos_router::generate_route_list_inner_with_context( + app_fn, + additional_context, + ); // Axum's Router defines Root routes as "/" not "" let mut routes = routes .into_iter() diff --git a/integrations/viz/src/lib.rs b/integrations/viz/src/lib.rs index 8abbfbfcc5..f5648217cd 100644 --- a/integrations/viz/src/lib.rs +++ b/integrations/viz/src/lib.rs @@ -1035,10 +1035,14 @@ pub fn generate_route_list_with_exclusions_and_ssg( app_fn: impl Fn() -> IV + 'static + Clone, excluded_routes: Option>, ) -> (Vec, StaticDataMap) - where - IV: IntoView + 'static, +where + IV: IntoView + 'static, { - generate_route_list_with_exclusions_and_ssg_and_context(app_fn, excluded_routes, || {}) + generate_route_list_with_exclusions_and_ssg_and_context( + app_fn, + excluded_routes, + || {}, + ) } /// Generates a list of all routes defined in Leptos's Router in your app. We can then use this to automatically @@ -1054,7 +1058,10 @@ where IV: IntoView + 'static, { let (routes, static_data_map) = - leptos_router::generate_route_list_inner_with_context(app_fn, additional_context); + leptos_router::generate_route_list_inner_with_context( + app_fn, + additional_context, + ); // Viz's Router defines Root routes as "/" not "" let mut routes = routes .into_iter() diff --git a/router/src/extract_routes.rs b/router/src/extract_routes.rs index 50cfc2c9e8..031632f13d 100644 --- a/router/src/extract_routes.rs +++ b/router/src/extract_routes.rs @@ -109,10 +109,10 @@ impl RouteListing { pub fn generate_route_list_inner( app_fn: impl Fn() -> IV + 'static + Clone, ) -> (Vec, StaticDataMap) - where - IV: IntoView + 'static, +where + IV: IntoView + 'static, { - generate_route_list_inner_with_context(app_fn, ||{}) + generate_route_list_inner_with_context(app_fn, || {}) } /// Generates a list of all routes this application could possibly serve. This returns the raw routes in the leptos_router /// format. Odds are you want `generate_route_list()` from either the [`actix`], [`axum`], or [`viz`] integrations if you want