fix: fix duplicate imports, type mismatch, and missing Read trait

This commit is contained in:
Andrew Phillips (aider)
2025-05-10 11:54:59 -03:00
parent 887e9cda42
commit 9fedd37494
4 changed files with 2 additions and 4 deletions

View File

@@ -1,5 +1,4 @@
use anyhow::{anyhow, Context, Result}; use anyhow::{anyhow, Context, Result};
use std::io::{self, Read};
use std::io::{Read, Write}; use std::io::{Read, Write};
use std::path::PathBuf; use std::path::PathBuf;
use std::process::{Command, Stdio}; use std::process::{Command, Stdio};

View File

@@ -1,4 +1,5 @@
use nix::fcntl::FdFlag; use nix::fcntl::FdFlag;
use std::io::Read;
use nix::unistd::{close, pipe}; use nix::unistd::{close, pipe};
use nix::Error as NixError; use nix::Error as NixError;
use std::collections::HashMap; use std::collections::HashMap;
@@ -302,7 +303,7 @@ fn main() -> Result<(), Error> {
debug!("MAIN: DB opened successfully"); debug!("MAIN: DB opened successfully");
match mode { match mode {
KeepModes::Save => crate::modes::save::mode_save(&mut cmd, args, ids, tags, conn, data_path)?, KeepModes::Save => crate::modes::save::mode_save(&mut cmd, args, ids, tags, &mut conn, data_path)?,
KeepModes::Get => { KeepModes::Get => {
crate::modes::get::mode_get(&mut cmd, args, ids, tags, &mut conn, data_path)? crate::modes::get::mode_get(&mut cmd, args, ids, tags, &mut conn, data_path)?
} }

View File

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

View File

@@ -1,7 +1,6 @@
use anyhow::{anyhow, Context, Result}; use anyhow::{anyhow, Context, Result};
use std::collections::HashMap; use std::collections::HashMap;
use std::io::{self, Read}; use std::io::{self, Read};
use is_terminal::IsTerminal;
use std::path::PathBuf; use std::path::PathBuf;
use is_terminal::IsTerminal; use is_terminal::IsTerminal;
use std::str::FromStr; use std::str::FromStr;