From 5f4fc35b71c1d8ff9e128e7e4a543d8aec96f6f0 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 13 Oct 2022 21:24:50 +0300 Subject: [PATCH] db::test::TestData variable length --- src/db.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/db.rs b/src/db.rs index 9c12dab..2b31807 100644 --- a/src/db.rs +++ b/src/db.rs @@ -321,10 +321,14 @@ mod test { #[derive(bincode::Encode, bincode::Decode, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] struct TestData { num: u64, + test: String, } fn gen_data(count: usize) -> impl Iterator { - (0..count).into_iter().map(|i| TestData { num: i as u64 }) + (0..count).into_iter().map(|i| TestData { + num: i as u64, + test: "test".repeat(i), + }) } #[test]