diff --git a/recipe/src/recipe.rs b/recipe/src/recipe.rs index 122d75d..886ce8e 100644 --- a/recipe/src/recipe.rs +++ b/recipe/src/recipe.rs @@ -69,7 +69,7 @@ pub struct Recipe<'a> { pub modules_ext: ModuleExt<'a>, } -impl<'a> Recipe<'a> { +impl Recipe<'_> { /// Parse a recipe file /// /// # Errors diff --git a/src/commands/bug_report.rs b/src/commands/bug_report.rs index ebbe778..dc242c4 100644 --- a/src/commands/bug_report.rs +++ b/src/commands/bug_report.rs @@ -62,7 +62,7 @@ impl BugReportCommand { os_version: os_info.version().clone(), }; - let issue_body = match generate_github_issue(&environment, &recipe) { + let issue_body = match generate_github_issue(&environment, recipe.as_ref()) { Ok(body) => body, Err(e) => { println!("{}: {e}", "Failed to generate bug report".bright_red()); @@ -276,8 +276,8 @@ fn get_pkg_branch_tag() -> String { format!("{} ({})", shadow::BRANCH, shadow::LAST_TAG) } -fn generate_github_issue(environment: &Environment, recipe: &Option) -> Result { - let recipe = serde_yaml::to_string(recipe).into_diagnostic()?; +fn generate_github_issue(environment: &Environment, recipe: Option<&Recipe>) -> Result { + let recipe = serde_yaml::to_string(&recipe).into_diagnostic()?; let github_template = GithubIssueTemplate::builder() .bb_version(shadow::PKG_VERSION) @@ -335,7 +335,7 @@ mod tests { }; let recipe = Recipe::default(); - let body = generate_github_issue(&environment, &Some(recipe)).unwrap(); + let body = generate_github_issue(&environment, Some(&recipe)).unwrap(); let link = make_github_issue_link(&body); assert!(link.contains(clap::crate_version!())); diff --git a/src/rpm_ostree_status.rs b/src/rpm_ostree_status.rs index 115ffe0..aa27a70 100644 --- a/src/rpm_ostree_status.rs +++ b/src/rpm_ostree_status.rs @@ -19,7 +19,7 @@ struct RpmOstreeDeployments<'a> { staged: bool, } -impl<'a> RpmOstreeStatus<'a> { +impl RpmOstreeStatus<'_> { /// Creates a status struct for `rpm-ostree`. /// /// # Errors