diff --git a/src/main.rs b/src/main.rs index e10d6c4..d307d6d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,7 +2,6 @@ mod args; mod config; mod modes; -use std::path::PathBuf; use anyhow::{Context, Error, Result, anyhow}; use clap::*; use clap::error::ErrorKind; @@ -38,7 +37,7 @@ fn main() -> Result<(), Error> { let proj_dirs = ProjectDirs::from("gt0.ca", "Andrew Phillips", "Keep"); let mut cmd = Args::command(); - let mut args = Args::parse(); + let args = Args::parse(); stderrlog::new() .module(module_path!()) @@ -166,7 +165,7 @@ fn main() -> Result<(), Error> { .with_context(|| format!("Unable to create data directory {:?}", data_path))?; // Initialize database - let mut conn = db::open(db_path)?; + let mut conn = db::open(db_path.clone())?; match mode { KeepModes::Save => modes::save::mode_save(&mut cmd, &settings, ids, tags, &mut conn, data_path),