refactor: follow clippy suggestions

This commit is contained in:
graelo 2021-03-13 18:51:31 +01:00
parent 7e28931f6c
commit ffd8e9b12d
7 changed files with 38 additions and 69 deletions

View file

@ -4,7 +4,7 @@ use crate::error::ParseError;
/// Execute an arbitrary Unix command and return the stdout as a `String` if
/// successful.
pub fn execute(command: &str, args: &Vec<&str>) -> Result<String, ParseError> {
pub fn execute(command: &str, args: &[&str]) -> Result<String, ParseError> {
let output = Command::new(command).args(args).output()?;
if !output.status.success() {