From 7826fef1202f212ec2b0811c139d000d2a8aa889 Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" Date: Fri, 13 May 2022 21:03:54 -0500 Subject: [PATCH] clippy (#25206) --- runtime/src/ancient_append_vecs.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/src/ancient_append_vecs.rs b/runtime/src/ancient_append_vecs.rs index 0eeace1eb..e1230cc9f 100644 --- a/runtime/src/ancient_append_vecs.rs +++ b/runtime/src/ancient_append_vecs.rs @@ -38,7 +38,7 @@ impl<'a> AccountsToStore<'a> { /// available_bytes: how many bytes remain in the primary storage. Excess accounts will be directed to an overflow storage pub fn new( mut available_bytes: u64, - stored_accounts: &'a Vec<(&'a Pubkey, &'a FoundStoredAccount<'a>)>, + stored_accounts: &'a [(&'a Pubkey, &'a FoundStoredAccount<'a>)], slot: Slot, ) -> Self { let num_accounts = stored_accounts.len(); @@ -122,7 +122,7 @@ pub mod tests { #[test] fn test_accounts_to_store_simple() { - let map = vec![].into_iter().collect(); + let map = vec![].into_iter().collect::>(); let slot = 1; let accounts_to_store = AccountsToStore::new(0, &map, slot); for selector in [StorageSelector::Primary, StorageSelector::Overflow] { @@ -173,7 +173,7 @@ pub mod tests { account_size, }; let src = vec![(pubkey, found)]; - let map = src.iter().map(|(a, b)| (a, b)).collect(); + let map = src.iter().map(|(a, b)| (a, b)).collect::>(); for (selector, available_bytes) in [ (StorageSelector::Primary, account_size), (StorageSelector::Overflow, account_size - 1),