misc: Automatic beta clippy fixes

e.g. cargo clippy --all --tests --all-targets --fix --features=..

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2022-09-20 09:46:19 +01:00
parent ab0b3f1b7b
commit f32487f8e8
11 changed files with 575 additions and 575 deletions

View File

@@ -52,7 +52,7 @@ pub struct MetricsReport {
impl Default for MetricsReport {
fn default() -> Self {
let mut git_human_readable = "".to_string();
if let Ok(git_out) = Command::new("git").args(&["describe", "--dirty"]).output() {
if let Ok(git_out) = Command::new("git").args(["describe", "--dirty"]).output() {
if git_out.status.success() {
git_human_readable = String::from_utf8(git_out.stdout)
.unwrap()
@@ -67,7 +67,7 @@ impl Default for MetricsReport {
}
let mut git_revision = "".to_string();
if let Ok(git_out) = Command::new("git").args(&["rev-parse", "HEAD"]).output() {
if let Ok(git_out) = Command::new("git").args(["rev-parse", "HEAD"]).output() {
if git_out.status.success() {
git_revision = String::from_utf8(git_out.stdout)
.unwrap()
@@ -83,7 +83,7 @@ impl Default for MetricsReport {
let mut git_commit_date = "".to_string();
if let Ok(git_out) = Command::new("git")
.args(&["show", "-s", "--format=%cd"])
.args(["show", "-s", "--format=%cd"])
.output()
{
if git_out.status.success() {