fix: remove Clone derive and fix context method usage

This commit is contained in:
Andrew Phillips (aider)
2025-05-12 20:48:44 -03:00
parent 89e8ade361
commit 5ab5a47090
2 changed files with 3 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
use anyhow::{anyhow, Context, Result}; use anyhow::{anyhow, Result};
use std::io; use std::io;
use lazy_static::lazy_static; use lazy_static::lazy_static;

View File

@@ -10,12 +10,11 @@ use std::process::{Command, Stdio};
use crate::digest_engine::DigestEngine; use crate::digest_engine::DigestEngine;
#[derive(Debug, Clone)] #[derive(Debug)]
pub struct DigestEngineProgram { pub struct DigestEngineProgram {
pub program: String, pub program: String,
pub args: Vec<String>, pub args: Vec<String>,
pub supported: bool, pub supported: bool,
process: Option<std::process::Child>,
} }
impl DigestEngineProgram { impl DigestEngineProgram {
@@ -53,7 +52,7 @@ impl DigestEngine for DigestEngineProgram {
.stdin(Stdio::piped()) .stdin(Stdio::piped())
.stdout(Stdio::piped()) .stdout(Stdio::piped())
.spawn() .spawn()
.with_context(anyhow!( .context(anyhow!(
"Problem spawning child process: {:?} {:?}", "Problem spawning child process: {:?} {:?}",
program, program,
args args