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:
zys864 2022-02-25 22:29:23 +08:00 committed by GitHub
parent 4ccc4bea71
commit cb168b96fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,9 +90,9 @@ async fn todos_index(
let todos = todos
.values()
.cloned()
.skip(pagination.offset.unwrap_or(0))
.take(pagination.limit.unwrap_or(usize::MAX))
.cloned()
.collect::<Vec<_>>();
Json(todos)