cargo fix axum

This commit is contained in:
Evan Almloff committed 2023-07-08 10:58:04 -07:00
1 parent 1e5c57dd16
commit 6a3198ef85
1 file changed
+4 -4
@@ -55,7 +55,7 @@
//! ``` //! ```
use axum::{ use axum::{
body::{self, Body, BoxBody, Full}, body::{self, Body, BoxBody},
extract::State, extract::State,
handler::Handler, handler::Handler,
http::{Request, Response, StatusCode}, http::{Request, Response, StatusCode},
@@ -63,10 +63,10 @@ use axum::{
routing::{get, post}, routing::{get, post},
Router, Router,
}; };
use server_fn::{Encoding, Payload, ServerFunctionRegistry}; use server_fn::{Encoding, ServerFunctionRegistry};
use std::sync::Arc; use std::sync::Arc;
use std::sync::RwLock; use std::sync::RwLock;
use tokio::task::spawn_blocking;
use crate::{ use crate::{
prelude::*, render::SSRState, serve_config::ServeConfig, server_context::DioxusServerContext, prelude::*, render::SSRState, serve_config::ServeConfig, server_context::DioxusServerContext,
@@ -264,7 +264,7 @@ where
let res = service.run(req); let res = service.run(req);
match res.await { match res.await {
Ok(res) => Ok::<_, std::convert::Infallible>(res.map(|b| b.into())), Ok(res) => Ok::<_, std::convert::Infallible>(res.map(|b| b.into())),
Err(e) => { Err(_e) => {
let mut res = Response::new(Body::empty()); let mut res = Response::new(Body::empty());
*res.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; *res.status_mut() = StatusCode::INTERNAL_SERVER_ERROR;
Ok(res) Ok(res)