From f51897b3c7aabe9541439d84677a18e3dfb56a63 Mon Sep 17 00:00:00 2001 From: Josh W Lewis Date: Mon, 29 Jul 2024 12:27:11 -0500 Subject: [PATCH] Set pedantic priority (#285) * Set pedantic priority * Fix clippy lints * Satisfy into::> --- Cargo.toml | 3 ++- buildpacks/go/tests/integration_test.rs | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 152f6ee..2fec890 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,8 @@ unused_crate_dependencies = "warn" [workspace.lints.clippy] panic_in_result_fn = "warn" -pedantic = "warn" +# The explicit priority is required due to https://github.com/rust-lang/cargo/issues/13565. +pedantic = { level = "warn", priority = -1 } unwrap_used = "warn" [profile.release] diff --git a/buildpacks/go/tests/integration_test.rs b/buildpacks/go/tests/integration_test.rs index f78c466..3f1581d 100644 --- a/buildpacks/go/tests/integration_test.rs +++ b/buildpacks/go/tests/integration_test.rs @@ -46,7 +46,8 @@ impl From for BuildConfig { } fn test_go_fixture(fixture: &str, expect_loglines: &[&str], refute_loglines: &[&str]) { - TestRunner::default().build(&IntegrationTestConfig::new(fixture).into(), |ctx| { + let build_config: BuildConfig = IntegrationTestConfig::new(fixture).into(); + TestRunner::default().build(build_config, |ctx| { let logs = format!("{}\n{}", ctx.pack_stdout, ctx.pack_stderr); for expect_line in expect_loglines { assert_contains!(logs, expect_line); @@ -170,16 +171,14 @@ fn test_basic_http_122() { #[test] #[ignore = "integration test"] fn test_go_artifact_caching() { - TestRunner::default().build( - &IntegrationTestConfig::new("basic_http_116").into(), - |ctx| { - assert_contains!(ctx.pack_stdout, "Installing go1.16.",); - let config = ctx.config.clone(); - ctx.rebuild(config, |ctx| { - assert_contains!(ctx.pack_stdout, "Reusing go1.16."); - }); - }, - ); + let build_config: BuildConfig = IntegrationTestConfig::new("basic_http_116").into(); + TestRunner::default().build(build_config, |ctx| { + assert_contains!(ctx.pack_stdout, "Installing go1.16.",); + let config = ctx.config.clone(); + ctx.rebuild(config, |ctx| { + assert_contains!(ctx.pack_stdout, "Reusing go1.16."); + }); + }); } #[test] @@ -191,7 +190,8 @@ fn test_go_binary_arch() { _ => (["(linux-amd64)", "linux-amd64.tar.gz"], "arm64"), }; - TestRunner::default().build(&integration_config.into(), |ctx| { + let build_config: BuildConfig = integration_config.into(); + TestRunner::default().build(build_config, |ctx| { for contain in contains { assert_contains!(ctx.pack_stdout, contain); }