From aa76655ba6a9943741d23ae4ba8d6cf83703fb05 Mon Sep 17 00:00:00 2001 From: Joseph Livesey Date: Tue, 10 Oct 2023 13:57:18 -0400 Subject: [PATCH 1/2] Fix bug in commit_store get_batch_by_transaction Signed-off-by: Joseph Livesey --- libsawtooth/src/journal/commit_store.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsawtooth/src/journal/commit_store.rs b/libsawtooth/src/journal/commit_store.rs index f7fae1b6e..303efd92f 100644 --- a/libsawtooth/src/journal/commit_store.rs +++ b/libsawtooth/src/journal/commit_store.rs @@ -324,7 +324,7 @@ impl CommitStore { .batches() .iter() .find(|batch| { - !batch + batch .transactions() .iter() .any(|txn| txn.header_signature() == transaction_id) From 10b4c5f5057118c4a0d57d59d2de0ae2db2444ba Mon Sep 17 00:00:00 2001 From: Joseph Livesey Date: Tue, 10 Oct 2023 14:00:53 -0400 Subject: [PATCH 2/2] Fix clippy unused_unit warning Signed-off-by: Joseph Livesey --- libsawtooth/src/transact/database/lmdb.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsawtooth/src/transact/database/lmdb.rs b/libsawtooth/src/transact/database/lmdb.rs index 49a347d63..6bcfffb9a 100644 --- a/libsawtooth/src/transact/database/lmdb.rs +++ b/libsawtooth/src/transact/database/lmdb.rs @@ -533,9 +533,9 @@ mod tests { }) } - fn run_test(test: T) -> () + fn run_test(test: T) where - T: FnOnce(&str) -> () + panic::UnwindSafe, + T: FnOnce(&str) + panic::UnwindSafe, { let dbpath = temp_db_path();