Skip to content

Instantly share code, notes, and snippets.

@aeyakovenko
Last active September 24, 2018 23:40
Show Gist options
  • Save aeyakovenko/34bd4c7aa6f5db1964c64cae1688402d to your computer and use it in GitHub Desktop.
Save aeyakovenko/34bd4c7aa6f5db1964c64cae1688402d to your computer and use it in GitHub Desktop.
[Running cargo test]
Compiling solana v0.9.0 (file:///Users/anatolyyakovenko/solana)
error[E0271]: type mismatch resolving `<std::sync::mpsc::TryIter<'_, (std::vec::Vec<transaction::Transaction>, hash::Hash)> as std::iter::IntoIterator>::Item == &(std::vec::Vec<transaction::Transaction>, hash::Hash)`
--> src/banking_stage.rs:122:90
|
122 | for (processed_transactions, hash) in [transaction_receiver.recv()?].into_iter().chain(transaction_receiver.try_iter()) {
| ^^^^^ expected tuple, found reference
|
= note: expected type `(std::vec::Vec<transaction::Transaction>, hash::Hash)`
found type `&(std::vec::Vec<transaction::Transaction>, hash::Hash)`
error[E0271]: type mismatch resolving `<std::sync::mpsc::TryIter<'_, (std::vec::Vec<transaction::Transaction>, hash::Hash)> as std::iter::Iterator>::Item == &(std::vec::Vec<transaction::Transaction>, hash::Hash)`
--> src/banking_stage.rs:122:47
|
122 | for (processed_transactions, hash) in [transaction_receiver.recv()?].into_iter().chain(transaction_receiver.try_iter()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected tuple, found reference
|
= note: expected type `(std::vec::Vec<transaction::Transaction>, hash::Hash)`
found type `&(std::vec::Vec<transaction::Transaction>, hash::Hash)`
= note: required because of the requirements on the impl of `std::iter::Iterator` for `std::iter::Chain<std::slice::Iter<'_, (std::vec::Vec<transaction::Transaction>, hash::Hash)>, std::sync::mpsc::TryIter<'_, (std::vec::Vec<transaction::Transaction>, hash::Hash)>>`
error: aborting due to 2 previous errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment