mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-07-18 05:48:10 -07:00
appease clippy
annoyingly these changes are totally unrelated to this PR, but our CI won't pass tests otherwise.
This commit is contained in:
committed by
Will Greenberg
parent
6b622eb208
commit
144df3fde1
+3
-3
@@ -115,15 +115,15 @@ pub struct MemoryStats {
|
|||||||
|
|
||||||
// runs the given command and returns its stdout as a string
|
// runs the given command and returns its stdout as a string
|
||||||
async fn get_cmd_output(mut cmd: Command) -> Result<String, String> {
|
async fn get_cmd_output(mut cmd: Command) -> Result<String, String> {
|
||||||
let cmd_str = format!("{:?}", &cmd);
|
let cmd_str = format!("{:?}", cmd);
|
||||||
let output = cmd
|
let output = cmd
|
||||||
.output()
|
.output()
|
||||||
.await
|
.await
|
||||||
.map_err(|e| format!("error running command {}: {}", &cmd_str, e))?;
|
.map_err(|e| format!("error running command {}: {}", cmd_str, e))?;
|
||||||
if !output.status.success() {
|
if !output.status.success() {
|
||||||
return Err(format!(
|
return Err(format!(
|
||||||
"command {} failed with exit code {}",
|
"command {} failed with exit code {}",
|
||||||
&cmd_str,
|
cmd_str,
|
||||||
output.status.code().unwrap()
|
output.status.code().unwrap()
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user