mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: clippy: add manual_string_new
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
committed by
Rob Bradford
parent
b4c62bf159
commit
fed010fcd1
@@ -48,7 +48,7 @@ pub struct MetricsReport {
|
||||
|
||||
impl Default for MetricsReport {
|
||||
fn default() -> Self {
|
||||
let mut git_human_readable = "".to_string();
|
||||
let mut git_human_readable = String::new();
|
||||
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)
|
||||
@@ -63,7 +63,7 @@ impl Default for MetricsReport {
|
||||
}
|
||||
}
|
||||
|
||||
let mut git_revision = "".to_string();
|
||||
let mut git_revision = String::new();
|
||||
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)
|
||||
@@ -78,7 +78,7 @@ impl Default for MetricsReport {
|
||||
}
|
||||
}
|
||||
|
||||
let mut git_commit_date = "".to_string();
|
||||
let mut git_commit_date = String::new();
|
||||
if let Ok(git_out) = Command::new("git")
|
||||
.args(["show", "-s", "--format=%cd"])
|
||||
.output()
|
||||
|
||||
Reference in New Issue
Block a user