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:
@ -1,4 +1,3 @@
|
|||||||
use anyhow::Result;
|
|
||||||
|
|
||||||
use crate::model::Model;
|
use crate::model::Model;
|
||||||
use crate::model::cell::{CellKey, CellValue};
|
use crate::model::cell::{CellKey, CellValue};
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
pub mod parser;
|
pub mod parser;
|
||||||
pub mod ast;
|
pub mod ast;
|
||||||
|
|
||||||
pub use ast::{AggFunc, Expr, Filter, Formula};
|
pub use ast::{AggFunc, Expr, Formula};
|
||||||
pub use parser::parse_formula;
|
pub use parser::parse_formula;
|
||||||
|
|||||||
@ -75,7 +75,7 @@ pub fn analyze_records(records: &[Value]) -> Vec<FieldProposal> {
|
|||||||
.collect();
|
.collect();
|
||||||
let distinct_vec: Vec<String> = distinct.into_iter().map(String::from).collect();
|
let distinct_vec: Vec<String> = distinct.into_iter().map(String::from).collect();
|
||||||
let n = distinct_vec.len();
|
let n = distinct_vec.len();
|
||||||
let total = values.len();
|
let _total = values.len();
|
||||||
|
|
||||||
// Check if looks like date
|
// Check if looks like date
|
||||||
let looks_like_date = distinct_vec.iter().any(|s| {
|
let looks_like_date = distinct_vec.iter().any(|s| {
|
||||||
|
|||||||
@ -1,5 +1,3 @@
|
|||||||
pub mod wizard;
|
pub mod wizard;
|
||||||
pub mod analyzer;
|
pub mod analyzer;
|
||||||
|
|
||||||
pub use wizard::{ImportWizard, ImportPipeline, WizardStep};
|
|
||||||
pub use analyzer::{FieldKind, FieldProposal, analyze_records};
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ use std::time::Duration;
|
|||||||
|
|
||||||
use anyhow::{Context, Result};
|
use anyhow::{Context, Result};
|
||||||
use crossterm::{
|
use crossterm::{
|
||||||
event::{self, Event, KeyCode, KeyModifiers},
|
event::{self, Event},
|
||||||
execute,
|
execute,
|
||||||
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
|
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
|
||||||
};
|
};
|
||||||
|
|||||||
@ -2,6 +2,5 @@ pub mod category;
|
|||||||
pub mod cell;
|
pub mod cell;
|
||||||
pub mod model;
|
pub mod model;
|
||||||
|
|
||||||
pub use category::{Category, CategoryId, Group, Item, ItemId};
|
pub use cell::CellKey;
|
||||||
pub use cell::{CellKey, CellValue, DataStore};
|
|
||||||
pub use model::Model;
|
pub use model::Model;
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
use std::collections::HashMap;
|
|
||||||
use indexmap::IndexMap;
|
use indexmap::IndexMap;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use anyhow::{anyhow, Result};
|
use anyhow::{anyhow, Result};
|
||||||
|
|||||||
@ -5,7 +5,6 @@ use crossterm::event::{KeyCode, KeyEvent, KeyModifiers};
|
|||||||
|
|
||||||
use crate::model::Model;
|
use crate::model::Model;
|
||||||
use crate::model::cell::{CellKey, CellValue};
|
use crate::model::cell::{CellKey, CellValue};
|
||||||
use crate::formula::parse_formula;
|
|
||||||
use crate::import::wizard::{ImportWizard, WizardStep};
|
use crate::import::wizard::{ImportWizard, WizardStep};
|
||||||
use crate::persistence;
|
use crate::persistence;
|
||||||
use crate::view::Axis;
|
use crate::view::Axis;
|
||||||
@ -929,7 +928,7 @@ impl App {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn jump_to_last_row(&mut self) {
|
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() {
|
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 row_cats: Vec<String> = view.categories_on(Axis::Row).into_iter().map(String::from).collect();
|
||||||
let count = row_cats.first()
|
let count = row_cats.first()
|
||||||
@ -944,7 +943,7 @@ impl App {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn jump_to_last_col(&mut self) {
|
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() {
|
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 col_cats: Vec<String> = view.categories_on(Axis::Column).into_iter().map(String::from).collect();
|
||||||
let count = col_cats.first()
|
let count = col_cats.first()
|
||||||
|
|||||||
@ -2,7 +2,6 @@ use ratatui::{
|
|||||||
buffer::Buffer,
|
buffer::Buffer,
|
||||||
layout::Rect,
|
layout::Rect,
|
||||||
style::{Color, Modifier, Style},
|
style::{Color, Modifier, Style},
|
||||||
text::{Line, Span},
|
|
||||||
widgets::{Block, Borders, Widget},
|
widgets::{Block, Borders, Widget},
|
||||||
};
|
};
|
||||||
use unicode_width::UnicodeWidthStr;
|
use unicode_width::UnicodeWidthStr;
|
||||||
@ -181,7 +180,7 @@ impl<'a> GridWidget<'a> {
|
|||||||
Style::default().fg(Color::Yellow).add_modifier(Modifier::BOLD));
|
Style::default().fg(Color::Yellow).add_modifier(Modifier::BOLD));
|
||||||
|
|
||||||
let mut x = area.x + ROW_HEADER_WIDTH;
|
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; }
|
if x >= area.x + area.width { break; }
|
||||||
let mut coords = page_coords.clone();
|
let mut coords = page_coords.clone();
|
||||||
for (cat, item) in col_cats.iter().zip(col_item.iter()) {
|
for (cat, item) in col_cats.iter().zip(col_item.iter()) {
|
||||||
|
|||||||
@ -7,4 +7,3 @@ pub mod tile_bar;
|
|||||||
pub mod import_wizard_ui;
|
pub mod import_wizard_ui;
|
||||||
pub mod help;
|
pub mod help;
|
||||||
|
|
||||||
pub use app::{App, AppMode};
|
|
||||||
|
|||||||
Reference in New Issue
Block a user