mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-14 17:57:57 -05:00
refactor: replace collect().is_empty() with next().is_none() in tests (#18902)
Co-authored-by: Alexey Shekhirin <5773434+shekhirin@users.noreply.github.com>
This commit is contained in:
@@ -1380,8 +1380,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_canonical_in_memory_state_canonical_chain_empty() {
|
||||
let state: CanonicalInMemoryState = CanonicalInMemoryState::empty();
|
||||
let chain: Vec<_> = state.canonical_chain().collect();
|
||||
assert!(chain.is_empty());
|
||||
assert!(state.canonical_chain().next().is_none());
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -921,8 +921,7 @@ mod tests {
|
||||
assert!(removed.is_empty());
|
||||
|
||||
// Verify that retrieving transactions from an empty pool yields nothing
|
||||
let all_txs: Vec<_> = pool.all().collect();
|
||||
assert!(all_txs.is_empty());
|
||||
assert!(pool.all().next().is_none());
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user