mirror of
https://github.com/actix/examples
synced 2025-06-26 17:17:42 +02:00
clippy
This commit is contained in:
@ -15,7 +15,7 @@ pub async fn graphql(
|
||||
};
|
||||
let res = web::block(move || {
|
||||
let res = data.execute_sync(&schema, &ctx);
|
||||
Ok::<_, serde_json::error::Error>(serde_json::to_string(&res)?)
|
||||
serde_json::to_string(&res)
|
||||
})
|
||||
.await
|
||||
.map_err(Error::from)?;
|
||||
|
@ -26,7 +26,7 @@ async fn graphql(
|
||||
) -> Result<HttpResponse, Error> {
|
||||
let user = web::block(move || {
|
||||
let res = data.execute_sync(&st, &());
|
||||
Ok::<_, serde_json::error::Error>(serde_json::to_string(&res)?)
|
||||
serde_json::to_string(&res)
|
||||
})
|
||||
.await?;
|
||||
Ok(HttpResponse::Ok()
|
||||
|
Reference in New Issue
Block a user