refactor: Move mode_diff to src/modes/diff.rs and update imports
This commit is contained in:
10
src/main.rs
10
src/main.rs
@@ -288,7 +288,7 @@ fn main() -> Result<(), Error> {
|
||||
KeepModes::Get => {
|
||||
crate::modes::get::mode_get(&mut cmd, args, ids, tags, &mut conn, data_path)?
|
||||
}
|
||||
KeepModes::Diff => mode_diff(&mut cmd, args, ids, tags, &mut conn, data_path)?,
|
||||
KeepModes::Diff => crate::modes::diff::mode_diff(&mut cmd, args, ids, tags, &mut conn, data_path)?,
|
||||
KeepModes::List => {
|
||||
crate::modes::list::mode_list(&mut cmd, args, ids, tags, &mut conn, data_path)?
|
||||
}
|
||||
@@ -308,14 +308,6 @@ fn main() -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn mode_diff(
|
||||
cmd: &mut clap::Command,
|
||||
_args: Args, // Mark as unused if not needed directly
|
||||
ids: &mut Vec<i64>,
|
||||
tags: &mut Vec<String>,
|
||||
conn: &mut Connection,
|
||||
data_path: PathBuf,
|
||||
) -> Result<()> {
|
||||
if !tags.is_empty() {
|
||||
cmd.error(
|
||||
ErrorKind::InvalidValue,
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
use crate::compression::CompressionType;
|
||||
use crate::modes::common::format_size;
|
||||
use crate::modes::common::get_format_box_chars_no_border_line_separator;
|
||||
use crate::modes::common::ColumnType;
|
||||
use crate::db::{get_item, get_item_last, get_item_matching};
|
||||
use crate::modes::common::format_size;
|
||||
use std::path::PathBuf;
|
||||
|
||||
Reference in New Issue
Block a user