Skip to content

Commit

Permalink
fix: Infallible lintining error (#318)
Browse files Browse the repository at this point in the history
* Fix: Infallible lintining error

* Update: unnecessary parentheses around block return value
  • Loading branch information
prakash-bhatt-yral authored Aug 13, 2024
1 parent f2ca93a commit d02dd08
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions ssr/src/fallback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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! { <App/> });
leptos_axum::render_app_to_stream(options.to_owned(), move || view! { <App /> });
handler(req).await.into_response()
}
}
Expand All @@ -34,11 +34,5 @@ async fn get_static_file(uri: Uri, root: &str) -> Result<Response<Body>, (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())
}

0 comments on commit d02dd08

Please sign in to comment.