diff --git a/Cargo.lock b/Cargo.lock index bc3d509..d10180e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -982,9 +982,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.20" +version = "0.12.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabf4c97d9130e2bf606614eb937e86edac8292eaa6f422f995d7e8de1eb1813" +checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531" dependencies = [ "base64", "bytes", diff --git a/integration_tests/src/lib.rs b/integration_tests/src/lib.rs index c7beb98..c652fa6 100644 --- a/integration_tests/src/lib.rs +++ b/integration_tests/src/lib.rs @@ -33,7 +33,7 @@ fn build_example(name: &str) -> Result<()> { } static FUNCTION_RUNNER_PATH: LazyLock> = LazyLock::new(|| { - let path = workspace_root().join(format!("tmp/function-runner-{}", FUNCTION_RUNNER_VERSION)); + let path = workspace_root().join(format!("tmp/function-runner-{FUNCTION_RUNNER_VERSION}")); if !path.exists() { std::fs::create_dir_all(workspace_root().join("tmp"))?; @@ -44,7 +44,7 @@ static FUNCTION_RUNNER_PATH: LazyLock> = LazyLock::new(| }); static TRAMPOLINE_PATH: LazyLock> = LazyLock::new(|| { - let path = workspace_root().join(format!("tmp/trampoline-{}", TRAMPOLINE_VERSION)); + let path = workspace_root().join(format!("tmp/trampoline-{TRAMPOLINE_VERSION}")); if !path.exists() { std::fs::create_dir_all(workspace_root().join("tmp"))?; download_trampoline(&path)?; @@ -56,8 +56,7 @@ fn download_function_runner(destination: &PathBuf) -> Result<()> { download_from_github( |target_arch, target_os| { format!( - "https://github.com/Shopify/function-runner/releases/download/v{}/function-runner-{}-{}-v{}.gz", - FUNCTION_RUNNER_VERSION, target_arch, target_os, FUNCTION_RUNNER_VERSION, + "https://github.com/Shopify/function-runner/releases/download/v{FUNCTION_RUNNER_VERSION}/function-runner-{target_arch}-{target_os}-v{FUNCTION_RUNNER_VERSION}.gz", ) }, destination, @@ -68,8 +67,7 @@ fn download_trampoline(destination: &PathBuf) -> Result<()> { download_from_github( |target_arch, target_os| { format!( - "https://github.com/Shopify/shopify-function-wasm-api/releases/download/shopify_function_trampoline/v{}/shopify-function-trampoline-{}-{}-v{}.gz", - TRAMPOLINE_VERSION, target_arch, target_os, TRAMPOLINE_VERSION, + "https://github.com/Shopify/shopify-function-wasm-api/releases/download/shopify_function_trampoline/v{TRAMPOLINE_VERSION}/shopify-function-trampoline-{target_arch}-{target_os}-v{TRAMPOLINE_VERSION}.gz", ) }, destination, @@ -127,10 +125,10 @@ pub fn prepare_example(name: &str) -> Result { build_example(name)?; let wasm_path = workspace_root() .join("target/wasm32-wasip1/release") - .join(format!("{}.wasm", name)); + .join(format!("{name}.wasm")); let trampolined_path = workspace_root() .join("target/wasm32-wasip1/release") - .join(format!("{}-trampolined.wasm", name)); + .join(format!("{name}-trampolined.wasm")); let trampoline_path = TRAMPOLINE_PATH .as_ref() .map_err(|e| anyhow::anyhow!("Failed to download trampoline: {}", e))?; diff --git a/shopify_function/tests/derive_deserialize_test.rs b/shopify_function/tests/derive_deserialize_test.rs index 0ff7b23..8c085c2 100644 --- a/shopify_function/tests/derive_deserialize_test.rs +++ b/shopify_function/tests/derive_deserialize_test.rs @@ -78,7 +78,7 @@ fn test_field_rename_takes_precedence_over_rename_all() { let input = TestStructWithRename::deserialize(&root_value).unwrap(); assert_eq!(input.field_one, "correct"); assert_eq!(input.field_two, 10); - assert_eq!(input.field_three, false); + assert!(!input.field_three); } #[derive(Deserialize, PartialEq, Debug)]