immux / immux1

https://immux.com
0 stars 0 forks source link

artificial bench fails to compile under Rust 1.38 #155

Closed blaesus closed 5 years ago

blaesus commented 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.
blaesus commented 5 years ago

I think it can be fixed if in the signature of verify_journal_against_db(), &[Unit] is used instead of &Vec<Unit>

poppindouble commented 5 years ago

I am on it