chore: clippy + fmt
This commit is contained in:
13
src/main.rs
13
src/main.rs
@ -1,18 +1,18 @@
|
||||
mod command;
|
||||
mod draw;
|
||||
mod formula;
|
||||
mod import;
|
||||
mod model;
|
||||
mod persistence;
|
||||
mod ui;
|
||||
mod view;
|
||||
mod draw;
|
||||
|
||||
use std::path::PathBuf;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
|
||||
use model::Model;
|
||||
use draw::run_tui;
|
||||
use model::Model;
|
||||
use serde_json::Value;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
@ -42,8 +42,9 @@ impl Runnable for CmdLineArgs {
|
||||
}
|
||||
}
|
||||
|
||||
fn csv_path_p(path:&PathBuf) -> bool {
|
||||
path.extension().is_some_and(|ext| ext.eq_ignore_ascii_case("csv"))
|
||||
fn csv_path_p(path: &Path) -> bool {
|
||||
path.extension()
|
||||
.is_some_and(|ext| ext.eq_ignore_ascii_case("csv"))
|
||||
}
|
||||
|
||||
fn get_import_data(path: PathBuf) -> Option<Value> {
|
||||
@ -115,7 +116,7 @@ impl Runnable for HeadlessArgs {
|
||||
}
|
||||
|
||||
if let Some(path) = self.file_path {
|
||||
persistence::save(&mut model, &path)?;
|
||||
persistence::save(&model, &path)?;
|
||||
}
|
||||
|
||||
std::process::exit(exit_code);
|
||||
|
||||
Reference in New Issue
Block a user