mirror of
https://github.com/tokio-rs/axum.git
synced 2025-10-01 06:51:05 +00:00
fix examples/todos
's async fn todos_index
iter_overeager_cloned (#794)
* remove unused `axum`'s dependency:`tokio-util` * fix `examples/todos`'s `async fn todos_index` iter_overeager_cloned
This commit is contained in:
parent
4ccc4bea71
commit
cb168b96fe
@ -90,9 +90,9 @@ async fn todos_index(
|
|||||||
|
|
||||||
let todos = todos
|
let todos = todos
|
||||||
.values()
|
.values()
|
||||||
.cloned()
|
|
||||||
.skip(pagination.offset.unwrap_or(0))
|
.skip(pagination.offset.unwrap_or(0))
|
||||||
.take(pagination.limit.unwrap_or(usize::MAX))
|
.take(pagination.limit.unwrap_or(usize::MAX))
|
||||||
|
.cloned()
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
Json(todos)
|
Json(todos)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user