diff --git a/ssr/src/fallback.rs b/ssr/src/fallback.rs index 3e95a265..834667b3 100644 --- a/ssr/src/fallback.rs +++ b/ssr/src/fallback.rs @@ -22,7 +22,7 @@ pub async fn file_and_error_handler( res.into_response() } else { let handler = - leptos_axum::render_app_to_stream(options.to_owned(), move || view! { }); + leptos_axum::render_app_to_stream(options.to_owned(), move || view! { }); handler(req).await.into_response() } } @@ -34,11 +34,5 @@ async fn get_static_file(uri: Uri, root: &str) -> Result, (Status .unwrap(); // `ServeDir` implements `tower::Service` so we can call it with `tower::ServiceExt::oneshot` // This path is relative to the cargo root - match ServeDir::new(root).oneshot(req).await { - Ok(res) => Ok(res.into_response()), - Err(err) => Err(( - StatusCode::INTERNAL_SERVER_ERROR, - format!("Something went wrong: {err}"), - )), - } + Ok(ServeDir::new(root).oneshot(req).await.into_response()) }