fix: remove Clone derive and fix context method usage
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user