From ed37fee69782586ea51ba104db0a879df2a2b500 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sun, 13 Aug 2023 12:33:19 +0300 Subject: [PATCH] fix clippy warnings in tests --- lib/src/async_db.rs | 4 ++-- lib/src/db.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/async_db.rs b/lib/src/async_db.rs index 0a2619d..c74dbf3 100644 --- a/lib/src/async_db.rs +++ b/lib/src/async_db.rs @@ -295,11 +295,11 @@ mod test { } fn gen_data(count: usize) -> impl Iterator { - (0..count).into_iter().map(|i| TestData { + (0..count).map(|i| TestData { num: i as u64, test: "test".repeat(i), vnum: (0..i * 120).map(|x| (x ^ 0x345FE34) as u64).collect(), - vstr: (0..i * 111).map(|x| "test".repeat(x).to_string()).collect(), + vstr: (0..i * 111).map(|x| "test".repeat(x)).collect(), }) } diff --git a/lib/src/db.rs b/lib/src/db.rs index 3244e7d..6838f67 100644 --- a/lib/src/db.rs +++ b/lib/src/db.rs @@ -403,7 +403,7 @@ mod test { } fn gen_data(count: usize) -> impl Iterator { - (0..count).into_iter().map(|i| TestData { + (0..count).map(|i| TestData { num: i as u64, test: "test".repeat(i), })