Skip to content

Instantly share code, notes, and snippets.

@aeyakovenko
Created January 4, 2019 13:49
Show Gist options
  • Save aeyakovenko/d8bafe32d7768d2e29a27a3556565a1a to your computer and use it in GitHub Desktop.
Save aeyakovenko/d8bafe32d7768d2e29a27a3556565a1a to your computer and use it in GitHub Desktop.
///ERROR:
--> src/accounts.rs:196:9
|
192 | pub fn account_values_slow<R>(&self, fork: u64) -> R
| - expected `R` because of return type
...
196 | self.accounts.iter().map(|(k, v)| (fork, (k, v)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type parameter, found struct
`std::iter::Map`
|
= note: expected type `R`
found type `std::iter::Map<hashbrown::map::Iter<'_, solana_
///CODE:
pub fn account_values_slow<R>(&self, fork: u64) -> R
where
R: Iterator<Item = (u64, (Pubkey, solana_sdk::account::Account))>,
{
self.accounts.iter().map(|(k, v)| (fork, (k, v)))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment