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

@@ -2,7 +2,6 @@ use nix::fcntl::FdFlag;
use nix::unistd::{close, pipe};
use nix::Error as NixError;
use std::collections::HashMap;
use std::io;
use std::os::fd::FromRawFd;
use std::path::PathBuf;
use std::process::Stdio; // For Stdio::null, Stdio::piped
@@ -10,7 +9,6 @@ use std::process::Stdio; // For Stdio::null, Stdio::piped
use anyhow::{anyhow, Context, Error, Result};
use clap::error::ErrorKind;
use clap::*;
use gethostname::gethostname;
use log::*;
use rusqlite::Connection;
mod modes;
@@ -27,6 +25,7 @@ use prettytable::format::{Alignment, TableFormat};
use prettytable::row;
use prettytable::{Attr, Cell, Row, Table};
use std::str::FromStr;
use chrono::prelude::*;
#[macro_use]
@@ -215,6 +214,7 @@ pub enum ColumnType {
}
fn main() -> Result<(), Error> {
use std::fs;
let proj_dirs = ProjectDirs::from("gt0.ca", "Andrew Phillips", "Keep");
let mut cmd = Args::command();
@@ -444,6 +444,7 @@ fn mode_diff(
std::thread::spawn(move || {
// Original code used .expect/.unwrap, implying panics on error.
// This matches that style. For more robust error handling, return Result from thread.
use std::io::BufWriter;
let mut buffered_pipe_writer_a = BufWriter::new(pipe_writer_a_raw);
let engine_a = compression::get_engine(compression_type_a_clone)
.expect("Unable to get compression engine for Item A");