chore: move csv_path_p, restructure modules
This commit is contained in:
@ -7,7 +7,9 @@ mod persistence;
|
||||
mod ui;
|
||||
mod view;
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
use crate::import::csv_parser::csv_path_p;
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
|
||||
@ -42,11 +44,6 @@ impl Runnable for CmdLineArgs {
|
||||
}
|
||||
}
|
||||
|
||||
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> {
|
||||
match std::fs::read_to_string(&path) {
|
||||
Err(e) => {
|
||||
|
||||
Reference in New Issue
Block a user