display name in clap is buggy

This commit is contained in:
pedrocarlo
2025-03-07 15:27:14 -03:00
parent 02c466cb1f
commit fe25035c7c
7 changed files with 78 additions and 143 deletions

View File

@@ -1,19 +1,6 @@
use anyhow::Error;
use clap::{Parser, Subcommand, Args};
use clap::Args;
use limbo_core::Connection;
use std::{
fs::File,
io::Write,
path::PathBuf,
rc::Rc,
sync::{Arc, LazyLock},
};
// pub static IMPORT_HELP: LazyLock<String> = LazyLock::new(|| {
// let empty: [&'static str; 2] = [".import", "--help"];
// let opts = ImportArgs::try_parse_from(empty);
// opts.map_err(|e| e.to_string()).unwrap_err()
// });
use std::{fs::File, io::Write, path::PathBuf, rc::Rc, sync::Arc};
#[derive(Debug, Clone, Args)]
pub struct ImportArgs {
@@ -47,14 +34,6 @@ impl<'a> ImportFile<'a> {
pub fn import(&mut self, args: ImportArgs) {
self.import_csv(args);
// let import_args = ImportArgs::try_parse_from(args.iter());
// match import_args {
// Ok(args) => {
// self.import_csv(args);
// Ok(())
// }
// Err(err) => Err(anyhow::anyhow!(err.to_string())),
// }
}
pub fn import_csv(&mut self, args: ImportArgs) {