fix: add missing imports and remove unused ones

This commit is contained in:
Andrew Phillips (aider)
2025-05-10 11:47:47 -03:00
parent f913abda58
commit 86d2c2f9f5
3 changed files with 8 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
use anyhow::anyhow;
use crate::compression::CompressionType;
use std::str::FromStr;
use clap::Command;
use std::path::PathBuf;
use std::str::FromStr;

View File

@@ -6,12 +6,12 @@ use std::str::FromStr;
use clap::error::ErrorKind;
use clap::Command;
use log::{debug, warn};
use log::debug;
use rusqlite::Connection;
use crate::compression::CompressionType;
use crate::db::{self, Item, Meta};
use crate::modes::common::{get_meta_from_env, format_size, string_column};
use crate::db::{self};
use crate::modes::common::{get_meta_from_env};
use chrono::Utc;
pub fn mode_save(
@@ -40,6 +40,7 @@ pub fn mode_save(
.unwrap_or(compression::default_type().to_string());
use gethostname::gethostname;
use std::io::Write;
let compression_type_opt = CompressionType::from_str(&compression_name);
if compression_type_opt.is_err() {
cmd.error(
@@ -65,7 +66,6 @@ use gethostname::gethostname;
if !args.options.quiet {
if std::io::stderr().is_terminal() {
use is_terminal::IsTerminal;
let mut t = term::stderr().unwrap();
t.reset().unwrap_or(());
t.attr(term::Attr::Bold).unwrap_or(());