mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-10 12:29:58 -06:00
Drop helpers the merged range reads no longer use
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
628da5117a
commit
96672e8ad5
@@ -185,13 +185,6 @@ pub(super) fn spills_as_before(sheet: &gridcraft_model::Sheet, anchor: CellRef,
|
||||
.all(|(i, c)| c == anchor || (!sheet.cells.has(c) && sheet.spill.get(&c) == Some(arr.data.get(i).unwrap_or(&Value::Empty))))
|
||||
}
|
||||
|
||||
/// The area an array anchored at `anchor` covers.
|
||||
fn array_area(anchor: CellRef, a: &Array) -> RangeRef {
|
||||
let end =
|
||||
CellRef::new(anchor.row.saturating_add((a.rows as u32).saturating_sub(1)), anchor.col.saturating_add((a.cols as u32).saturating_sub(1)));
|
||||
RangeRef::new(anchor, end)
|
||||
}
|
||||
|
||||
/// The spilled values `sheet` stores inside `range`, passed to `f` until it returns false. Values
|
||||
/// outside the range are not walked: with fewer rows in the range than spilled values, each row
|
||||
/// is looked up on its own; otherwise one ordered scan visits each spilled value at most once.
|
||||
|
||||
@@ -77,6 +77,7 @@ pub(crate) fn indexing_pays<'a>(areas: impl ExactSizeIterator<Item = &'a RangeRe
|
||||
|
||||
impl SpillIndex {
|
||||
/// Whether any area is indexed on `sheet`.
|
||||
#[cfg(test)]
|
||||
pub(crate) fn has_sheet(&self, sheet: usize) -> bool {
|
||||
self.sheets.get(&sheet).is_some_and(|s| !s.entries.is_empty())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user