refactor: eliminate Box<dyn Iterator> and Option sentinels in export_csv

The CSV export used Box<dyn Iterator<Item = Option<usize>>> to unify
empty and non-empty row iteration, violating the CLAUDE.md rule that
Box/Rc container management should be split from logic. Replaced with a
direct for loop over row indices, removing both the Box and the Option
sentinels used to represent "placeholder empty row/col".

Also removes unused pub use cell::CellKey re-export and an unused
import in cell.rs tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ed L
2026-03-24 09:00:37 -07:00
parent 6038cb2d81
commit c8b88c63b3
3 changed files with 10 additions and 25 deletions

View File

@ -143,7 +143,7 @@ impl DataStore {
#[cfg(test)]
mod cell_key {
use super::{CellKey, CellValue, DataStore};
use super::CellKey;
fn key(pairs: &[(&str, &str)]) -> CellKey {
CellKey::new(pairs.iter().map(|(c, i)| (c.to_string(), i.to_string())).collect())

View File

@ -2,5 +2,4 @@ pub mod category;
pub mod cell;
pub mod model;
pub use cell::CellKey;
pub use model::Model;