diff --git a/src/command/dispatch.rs b/src/command/dispatch.rs index 12796f8..c8d5bf1 100644 --- a/src/command/dispatch.rs +++ b/src/command/dispatch.rs @@ -1,4 +1,3 @@ -use anyhow::Result; use crate::model::Model; use crate::model::cell::{CellKey, CellValue}; diff --git a/src/formula/mod.rs b/src/formula/mod.rs index 31e8b68..5118069 100644 --- a/src/formula/mod.rs +++ b/src/formula/mod.rs @@ -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; diff --git a/src/import/analyzer.rs b/src/import/analyzer.rs index 3058fc9..af5ee30 100644 --- a/src/import/analyzer.rs +++ b/src/import/analyzer.rs @@ -75,7 +75,7 @@ pub fn analyze_records(records: &[Value]) -> Vec { .collect(); let distinct_vec: Vec = 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| { diff --git a/src/import/mod.rs b/src/import/mod.rs index 5e6b203..deff08c 100644 --- a/src/import/mod.rs +++ b/src/import/mod.rs @@ -1,5 +1,3 @@ pub mod wizard; pub mod analyzer; -pub use wizard::{ImportWizard, ImportPipeline, WizardStep}; -pub use analyzer::{FieldKind, FieldProposal, analyze_records}; diff --git a/src/main.rs b/src/main.rs index f0ef42d..b46a71e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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}, }; diff --git a/src/model/mod.rs b/src/model/mod.rs index c8eee44..b6be606 100644 --- a/src/model/mod.rs +++ b/src/model/mod.rs @@ -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; diff --git a/src/model/model.rs b/src/model/model.rs index 1802c1f..2e889d6 100644 --- a/src/model/model.rs +++ b/src/model/model.rs @@ -1,4 +1,3 @@ -use std::collections::HashMap; use indexmap::IndexMap; use serde::{Deserialize, Serialize}; use anyhow::{anyhow, Result}; diff --git a/src/ui/app.rs b/src/ui/app.rs index 5b228a3..9e29610 100644 --- a/src/ui/app.rs +++ b/src/ui/app.rs @@ -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 = 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 = view.categories_on(Axis::Column).into_iter().map(String::from).collect(); let count = col_cats.first() diff --git a/src/ui/grid.rs b/src/ui/grid.rs index d85a9a4..107b8ba 100644 --- a/src/ui/grid.rs +++ b/src/ui/grid.rs @@ -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()) { diff --git a/src/ui/mod.rs b/src/ui/mod.rs index 6113508..758b256 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -7,4 +7,3 @@ pub mod tile_bar; pub mod import_wizard_ui; pub mod help; -pub use app::{App, AppMode};