Skip to content

Commit

Permalink
clippy+fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
grooviegermanikus committed Dec 9, 2024
1 parent 56c5fd8 commit 4b68f6b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
8 changes: 5 additions & 3 deletions accounts/src/inmemory_account_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,12 @@ impl AccountDataByCommitment {
.unwrap_or(true);

let mut updated = false;
if !self.processed_accounts.contains_key(&data.updated_slot) {

if let std::collections::btree_map::Entry::Vacant(e) =
self.processed_accounts.entry(data.updated_slot)
{
// processed not present for the slot
self.processed_accounts
.insert(data.updated_slot, data.clone());
e.insert(data.clone());
updated = true;
}

Expand Down
14 changes: 4 additions & 10 deletions address-lookup-tables/src/address_lookup_table_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,11 @@ impl AddressLookupTableStore {
}

pub async fn get_accounts(&self, alt: &Pubkey, accounts: &[u8]) -> Vec<Pubkey> {
match self
.get_accounts_in_address_lookup_table(alt, accounts)
self.get_accounts_in_address_lookup_table(alt, accounts)
.await
{
Some(x) => x,
None => {
// forget alt for now, start loading it for next blocks
// loading should be on its way
vec![]
}
}
// fallback to empty vec; forget alt for now, start loading it for next blocks
// loading should be on its way
.unwrap_or_default()
}

pub fn serialize_binary(&self) -> Vec<u8> {
Expand Down
2 changes: 1 addition & 1 deletion blockstore/examples/bench_postgres_simple_select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub async fn main() -> anyhow::Result<()> {
}

async fn parallel_queries(pg_session_config: PostgresSessionConfig) {
let many_sessions = vec![
let many_sessions = [
PostgresSession::new(pg_session_config.clone())
.await
.unwrap(),
Expand Down

0 comments on commit 4b68f6b

Please sign in to comment.