chore: drop allow(unused) and clear what it hid
This commit is contained in:
@@ -1,12 +1,7 @@
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
use anyhow::{Context, Result};
|
||||
use std::{
|
||||
collections::VecDeque,
|
||||
env,
|
||||
ffi::OsStr,
|
||||
fmt::Display,
|
||||
fs::{File, OpenOptions},
|
||||
os::unix::process::CommandExt,
|
||||
path::PathBuf,
|
||||
process::{Child, Command, Stdio},
|
||||
};
|
||||
|
||||
@@ -77,20 +72,20 @@ impl CommandBuilder {
|
||||
Ok(command)
|
||||
}
|
||||
|
||||
pub fn exec_get_stdout(mut self) -> Result<String> {
|
||||
pub fn exec_get_stdout(self) -> Result<String> {
|
||||
Ok(String::from_utf8(self.build()?.output()?.stdout)?)
|
||||
}
|
||||
|
||||
pub fn exec(mut self) -> Result<()> {
|
||||
pub fn exec(self) -> Result<()> {
|
||||
self.build()?.spawn()?.wait()?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn spawn(mut self) -> Result<(Child)> {
|
||||
pub fn spawn(self) -> Result<Child > {
|
||||
Ok(self.build()?.spawn()?)
|
||||
}
|
||||
|
||||
pub fn exec_redirect_stdout(mut self, stdio: Stdio) -> Result<()> {
|
||||
pub fn exec_redirect_stdout(self, stdio: Stdio) -> Result<()> {
|
||||
self.build()?.stdout(stdio).spawn()?.wait()?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user