From cb168b96fed0aafd6e6cffc4a7969bf88a9c68a4 Mon Sep 17 00:00:00 2001 From: zys864 Date: Fri, 25 Feb 2022 22:29:23 +0800 Subject: [PATCH] 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 --- examples/todos/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/todos/src/main.rs b/examples/todos/src/main.rs index 409a9b66..c98a6989 100644 --- a/examples/todos/src/main.rs +++ b/examples/todos/src/main.rs @@ -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::>(); Json(todos)