Skip to content

DesignCraft: An open-source page and layout design editor written by scratch in pure Rust

find: move the table id into the cell iterator (E0373)

Brandon Thomas2aa2ef4b7c6f
diff --git a/crates/engine/src/cmd/find.rs b/crates/engine/src/cmd/find.rs
index a8cebf35b..a40e8da51 100644
--- a/crates/engine/src/cmd/find.rs
+++ b/crates/engine/src/cmd/find.rs
@@ -270,7 +270,7 @@ fn scope(s: &Session, p: &Value) -> Result<FindContext> {
.stories
.values()
.flat_map(|x| {
- let cells = x.tables.iter().flat_map(|(id, t)| {
+ let cells = x.tables.iter().flat_map(move |(id, t)| {
let cols = t.ncols().max(1);
t.cells.iter().enumerate().map(move |(i, c)| (x.id, Some(CellAddr { table: *id, row: i / cols, col: i % cols }), 0..c.text.len()))
});