style: factor the event-pair type out of the reconvergence fixture
clippy's `type_complexity` fires on the tuple-of-vectors return. Caught after pushing, because the verification chain used `&&` between `just lint` and a `grep` that succeeded on the error text — so a failing lint reported success. The gate has to be on the command, not on whether the output matched.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
# Seeds for failure cases proptest has generated in the past. It is
|
||||
# automatically read and these particular cases re-run before any
|
||||
# novel cases are generated.
|
||||
#
|
||||
# It is recommended to check this file in to source control so that
|
||||
# everyone who runs the test benefits from these saved cases.
|
||||
cc 8859be600e638573980f78622b8fcd8b4553ca34a9a041746c417f7e4293f89c # shrinks to games = [(0, 1), (0, 1), (4, 6), (2, 0), (0, 1), (0, 6), (0, 1), (2, 0), (6, 4), (0, 1), (0, 2), (6, 4), (1, 0), (4, 0), (0, 2)]
|
||||
@@ -34,7 +34,7 @@ fn ev(a: &str, b: &str, time: i64) -> Event<i64, String> {
|
||||
}
|
||||
|
||||
/// Ingest each chunk in turn, converging fully after every one.
|
||||
fn fit_in_chunks(chunks: Vec<Vec<Event<i64, String>>>) -> Vec<(String, Gaussian)> {
|
||||
fn fit_in_chunks(chunks: Vec<Events>) -> Vec<(String, Gaussian)> {
|
||||
let mut h: History<i64, _, _, String> =
|
||||
History::builder_with_key().convergence(tight()).build();
|
||||
|
||||
@@ -76,7 +76,10 @@ fn assert_same(a: &[(String, Gaussian)], b: &[(String, Gaussian)], what: &str) {
|
||||
}
|
||||
}
|
||||
|
||||
fn fixture() -> (Vec<Event<i64, String>>, Vec<Event<i64, String>>) {
|
||||
type Events = Vec<Event<i64, String>>;
|
||||
|
||||
/// Two chunks of events: the first at times 0..20, the second at 100..120.
|
||||
fn fixture() -> (Events, Events) {
|
||||
let names = ["a", "b", "c", "d", "e"];
|
||||
let mut seed = 7u64;
|
||||
let mut rnd = move || {
|
||||
|
||||
Reference in New Issue
Block a user