Closed blaesus closed 5 years ago
As titled.
$ cargo bench [14:10:46] Compiling immuxdb v0.1.0 (/Users/andy/code/immux) error[E0631]: type mismatch in function arguments --> benches/artificial/journal.rs:32:26 | 32 | verification_fn: &verify_journal_against_db, | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | expected signature of `for<'r, 's, 't0> fn(&'r immuxdb_client::ImmuxDBClient, &'s libimmuxdb::declarations::basics::grouping_label::GroupingLabel, &'t0 [libimmuxdb::declarations::basics::unit::Unit]) -> _` | found signature of `for<'r, 's, 't0> fn(&'r immuxdb_client::ImmuxDBClient, &'s libimmuxdb::declarations::basics::grouping_label::GroupingLabel, &'t0 std::vec::Vec<libimmuxdb::declarations::basics::unit::Unit>) -> _` | = note: required for the cast to the object type `dyn for<'r, 's, 't0> std::ops::Fn(&'r immuxdb_client::ImmuxDBClient, &'s libimmuxdb::declarations::basics::grouping_label::GroupingLabel, &'t0 [libimmuxdb::declarations::basics::unit::Unit]) -> bool` error[E0631]: type mismatch in function arguments --> benches/artificial/journal.rs:32:26 | 32 | verification_fn: &verify_journal_against_db, | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | expected signature of `fn(&immuxdb_client::ImmuxDBClient, &libimmuxdb::declarations::basics::grouping_label::GroupingLabel, &[libimmuxdb::declarations::basics::unit::Unit]) -> _` | found signature of `for<'r, 's, 't0> fn(&'r immuxdb_client::ImmuxDBClient, &'s libimmuxdb::declarations::basics::grouping_label::GroupingLabel, &'t0 std::vec::Vec<libimmuxdb::declarations::basics::unit::Unit>) -> _` | = note: required for the cast to the object type `dyn for<'r, 's, 't0> std::ops::Fn(&'r immuxdb_client::ImmuxDBClient, &'s libimmuxdb::declarations::basics::grouping_label::GroupingLabel, &'t0 [libimmuxdb::declarations::basics::unit::Unit]) -> bool` error: aborting due to 2 previous errors error: Could not compile `immuxdb`. To learn more, run the command again with --verbose.
I think it can be fixed if in the signature of verify_journal_against_db(), &[Unit] is used instead of &Vec<Unit>
verify_journal_against_db()
&[Unit]
&Vec<Unit>
I am on it
As titled.