mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-10 04:19:48 -06:00
Factor out types clippy flags as too complex
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
4b98b11996
commit
00f565bc11
@@ -13,6 +13,9 @@ const MAX_NESTED: usize = 64;
|
||||
/// evaluated again), however high Maximum Iterations is.
|
||||
const MAX_ITERATION_WORK: usize = 10_000_000;
|
||||
|
||||
/// A block's results by last row: its sum and count, or `None` when it can't be summed from constants.
|
||||
type BlockSums = std::collections::BTreeMap<u32, Option<(f64, u64)>>;
|
||||
|
||||
pub(super) struct PassHost<'a> {
|
||||
wb: &'a Workbook,
|
||||
exprs: &'a HashMap<Key, std::sync::Arc<Expr>>,
|
||||
@@ -71,7 +74,7 @@ pub(super) struct PassHost<'a> {
|
||||
/// Sum and count of blocks that hold only constants, for `range_sum`. Keyed by sheet, first
|
||||
/// cell and last column; each value maps a last row to the block's result (`None`: the block
|
||||
/// has a formula, a Python cell, an error value or a spilled value, so every longer one has too).
|
||||
sums: HashMap<(usize, CellRef, u32), std::collections::BTreeMap<u32, Option<(f64, u64)>>>,
|
||||
sums: HashMap<(usize, CellRef, u32), BlockSums>,
|
||||
/// The kept results of the Python cells in the pass: a Python cell isn't evaluated, its
|
||||
/// result is laid out (an array spills from the cell, as a formula's does). Each one is in
|
||||
/// `pending` until it is laid out, so a formula that reads it first gets its new value.
|
||||
|
||||
@@ -2348,7 +2348,8 @@ fn aggregates_over_ranges_match_a_plain_fold_bit_for_bit() {
|
||||
}
|
||||
}
|
||||
// Formulas in column H and up: (function, optional leading number, blocks).
|
||||
let mut oracle: Vec<(CellRef, &str, Option<f64>, Vec<(u32, u32, u32, u32)>)> = vec![];
|
||||
type Oracle<'a> = (CellRef, &'a str, Option<f64>, Vec<(u32, u32, u32, u32)>);
|
||||
let mut oracle: Vec<Oracle> = vec![];
|
||||
let funcs = ["SUM", "COUNT", "AVERAGE"];
|
||||
let mut at = 0;
|
||||
let mut add = |wb: &mut Workbook, f: &'static str, lead: Option<f64>, blocks: Vec<(u32, u32, u32, u32)>| {
|
||||
|
||||
Reference in New Issue
Block a user