Skip to content

Commit

Permalink
Use impl IntoResponse more places
Browse files Browse the repository at this point in the history
  • Loading branch information
tyleragreen committed Feb 9, 2024
1 parent f42b03d commit 8ba5f54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example-app/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct Status {
status: String,
}

async fn status_handler() -> Json<Status> {
async fn status_handler() -> impl IntoResponse {
Json(Status {
status: "OK".to_string(),
})
Expand All @@ -57,7 +57,7 @@ struct CreateFeed {
async fn post_handler(
state: State<AppState>,
Json(payload): Json<CreateFeed>,
) -> (StatusCode, Json<Feed>) {
) -> impl IntoResponse {
let id = *(state.feed_id.read().unwrap());
let feed = Feed {
id,
Expand Down

0 comments on commit 8ba5f54

Please sign in to comment.