Chore: remove unused imports and suppress unused variable warnings

Removes dead use statements across dispatch, formula, import, model, and
UI modules. Prefixes intentionally unused variables with _ in app.rs,
analyzer.rs, and grid.rs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ed L
2026-03-21 23:35:50 -07:00
parent 77f83bac3a
commit cc072e192d
10 changed files with 7 additions and 15 deletions

View File

@ -1,4 +1,3 @@
use anyhow::Result;
use crate::model::Model;
use crate::model::cell::{CellKey, CellValue};

View File

@ -1,5 +1,5 @@
pub mod parser;
pub mod ast;
pub use ast::{AggFunc, Expr, Filter, Formula};
pub use ast::{AggFunc, Expr, Formula};
pub use parser::parse_formula;

View File

@ -75,7 +75,7 @@ pub fn analyze_records(records: &[Value]) -> Vec<FieldProposal> {
.collect();
let distinct_vec: Vec<String> = distinct.into_iter().map(String::from).collect();
let n = distinct_vec.len();
let total = values.len();
let _total = values.len();
// Check if looks like date
let looks_like_date = distinct_vec.iter().any(|s| {

View File

@ -1,5 +1,3 @@
pub mod wizard;
pub mod analyzer;
pub use wizard::{ImportWizard, ImportPipeline, WizardStep};
pub use analyzer::{FieldKind, FieldProposal, analyze_records};

View File

@ -12,7 +12,7 @@ use std::time::Duration;
use anyhow::{Context, Result};
use crossterm::{
event::{self, Event, KeyCode, KeyModifiers},
event::{self, Event},
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
};

View File

@ -2,6 +2,5 @@ pub mod category;
pub mod cell;
pub mod model;
pub use category::{Category, CategoryId, Group, Item, ItemId};
pub use cell::{CellKey, CellValue, DataStore};
pub use cell::CellKey;
pub use model::Model;

View File

@ -1,4 +1,3 @@
use std::collections::HashMap;
use indexmap::IndexMap;
use serde::{Deserialize, Serialize};
use anyhow::{anyhow, Result};

View File

@ -5,7 +5,6 @@ use crossterm::event::{KeyCode, KeyEvent, KeyModifiers};
use crate::model::Model;
use crate::model::cell::{CellKey, CellValue};
use crate::formula::parse_formula;
use crate::import::wizard::{ImportWizard, WizardStep};
use crate::persistence;
use crate::view::Axis;
@ -929,7 +928,7 @@ impl App {
}
fn jump_to_last_row(&mut self) {
let view_name = self.model.active_view.clone();
let _view_name = self.model.active_view.clone();
if let Some(view) = self.model.active_view() {
let row_cats: Vec<String> = view.categories_on(Axis::Row).into_iter().map(String::from).collect();
let count = row_cats.first()
@ -944,7 +943,7 @@ impl App {
}
fn jump_to_last_col(&mut self) {
let view_name = self.model.active_view.clone();
let _view_name = self.model.active_view.clone();
if let Some(view) = self.model.active_view() {
let col_cats: Vec<String> = view.categories_on(Axis::Column).into_iter().map(String::from).collect();
let count = col_cats.first()

View File

@ -2,7 +2,6 @@ use ratatui::{
buffer::Buffer,
layout::Rect,
style::{Color, Modifier, Style},
text::{Line, Span},
widgets::{Block, Borders, Widget},
};
use unicode_width::UnicodeWidthStr;
@ -181,7 +180,7 @@ impl<'a> GridWidget<'a> {
Style::default().fg(Color::Yellow).add_modifier(Modifier::BOLD));
let mut x = area.x + ROW_HEADER_WIDTH;
for (ci, col_item) in visible_col_items.iter().enumerate() {
for (_ci, col_item) in visible_col_items.iter().enumerate() {
if x >= area.x + area.width { break; }
let mut coords = page_coords.clone();
for (cat, item) in col_cats.iter().zip(col_item.iter()) {

View File

@ -7,4 +7,3 @@ pub mod tile_bar;
pub mod import_wizard_ui;
pub mod help;
pub use app::{App, AppMode};