From dcc744c6ec39ef044303108145a2107fc11fb2eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 15 Aug 2024 16:34:17 +0200 Subject: [PATCH] Fix clippy --- src/helm_config.rs | 13 ++++++------- src/main.rs | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/helm_config.rs b/src/helm_config.rs index 107b65c..a9ba3ab 100644 --- a/src/helm_config.rs +++ b/src/helm_config.rs @@ -12,26 +12,25 @@ pub struct ImageRefs { } impl ImageRefs { - pub fn parse(repo: &Repository, diff_file: DiffFile) -> Result { + pub fn parse(repo: &Repository, diff_file: &DiffFile) -> Result { let blob_id = diff_file.id(); let blob = repo .find_blob(blob_id) .with_context(|| format!("cannot find Git blob {blob_id}"))?; - Ok(serde_yml::from_slice(blob.content()) - .with_context(|| format!("cannot parse yaml file {:?}", diff_file.path()))?) + serde_yml::from_slice(blob.content()).with_context(|| format!("cannot parse yaml file {:?}", diff_file.path())) } } #[derive(Debug, Serialize, Deserialize)] pub struct ImageRef { - pub account: String, + pub account: String, pub repository: String, - pub tag: String, - pub sources: Vec, + pub tag: String, + pub sources: Vec, } #[derive(Debug, Serialize, Deserialize)] pub struct SourceRepoRef { - pub repo: String, + pub repo: String, pub commit: String, } diff --git a/src/main.rs b/src/main.rs index 0ed893f..6ce7abd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -137,11 +137,11 @@ fn find_values_yaml(workspace: String, base: &str, head: &str) -> Result