diff --git a/examples/todos/src/main.rs b/examples/todos/src/main.rs index 6f115daf3c..cef395b715 100644 --- a/examples/todos/src/main.rs +++ b/examples/todos/src/main.rs @@ -82,14 +82,9 @@ pub struct Pagination { pub limit: Option, } -async fn todos_index( - pagination: Option>, - State(db): State, -) -> impl IntoResponse { +async fn todos_index(pagination: Query, State(db): State) -> impl IntoResponse { let todos = db.read().unwrap(); - let Query(pagination) = pagination.unwrap_or_default(); - let todos = todos .values() .skip(pagination.offset.unwrap_or(0))