Skip to content

Commit ef18f3a

Browse files
committed
Lint
1 parent a72cfef commit ef18f3a

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

integration_tests/src/lib.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fn build_example(name: &str) -> Result<()> {
3333
}
3434

3535
static FUNCTION_RUNNER_PATH: LazyLock<anyhow::Result<PathBuf>> = LazyLock::new(|| {
36-
let path = workspace_root().join(format!("tmp/function-runner-{}", FUNCTION_RUNNER_VERSION));
36+
let path = workspace_root().join(format!("tmp/function-runner-{FUNCTION_RUNNER_VERSION}"));
3737

3838
if !path.exists() {
3939
std::fs::create_dir_all(workspace_root().join("tmp"))?;
@@ -44,7 +44,7 @@ static FUNCTION_RUNNER_PATH: LazyLock<anyhow::Result<PathBuf>> = LazyLock::new(|
4444
});
4545

4646
static TRAMPOLINE_PATH: LazyLock<anyhow::Result<PathBuf>> = LazyLock::new(|| {
47-
let path = workspace_root().join(format!("tmp/trampoline-{}", TRAMPOLINE_VERSION));
47+
let path = workspace_root().join(format!("tmp/trampoline-{TRAMPOLINE_VERSION}"));
4848
if !path.exists() {
4949
std::fs::create_dir_all(workspace_root().join("tmp"))?;
5050
download_trampoline(&path)?;
@@ -56,8 +56,7 @@ fn download_function_runner(destination: &PathBuf) -> Result<()> {
5656
download_from_github(
5757
|target_arch, target_os| {
5858
format!(
59-
"https://github.com/Shopify/function-runner/releases/download/v{}/function-runner-{}-{}-v{}.gz",
60-
FUNCTION_RUNNER_VERSION, target_arch, target_os, FUNCTION_RUNNER_VERSION,
59+
"https://github.com/Shopify/function-runner/releases/download/v{FUNCTION_RUNNER_VERSION}/function-runner-{target_arch}-{target_os}-v{FUNCTION_RUNNER_VERSION}.gz",
6160
)
6261
},
6362
destination,
@@ -68,8 +67,7 @@ fn download_trampoline(destination: &PathBuf) -> Result<()> {
6867
download_from_github(
6968
|target_arch, target_os| {
7069
format!(
71-
"https://github.com/Shopify/shopify-function-wasm-api/releases/download/shopify_function_trampoline/v{}/shopify-function-trampoline-{}-{}-v{}.gz",
72-
TRAMPOLINE_VERSION, target_arch, target_os, TRAMPOLINE_VERSION,
70+
"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",
7371
)
7472
},
7573
destination,
@@ -127,10 +125,10 @@ pub fn prepare_example(name: &str) -> Result<PathBuf> {
127125
build_example(name)?;
128126
let wasm_path = workspace_root()
129127
.join("target/wasm32-wasip1/release")
130-
.join(format!("{}.wasm", name));
128+
.join(format!("{name}.wasm"));
131129
let trampolined_path = workspace_root()
132130
.join("target/wasm32-wasip1/release")
133-
.join(format!("{}-trampolined.wasm", name));
131+
.join(format!("{name}-trampolined.wasm"));
134132
let trampoline_path = TRAMPOLINE_PATH
135133
.as_ref()
136134
.map_err(|e| anyhow::anyhow!("Failed to download trampoline: {}", e))?;

shopify_function/tests/derive_deserialize_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ fn test_field_rename_takes_precedence_over_rename_all() {
7878
let input = TestStructWithRename::deserialize(&root_value).unwrap();
7979
assert_eq!(input.field_one, "correct");
8080
assert_eq!(input.field_two, 10);
81-
assert_eq!(input.field_three, false);
81+
assert!(!input.field_three);
8282
}
8383

8484
#[derive(Deserialize, PartialEq, Debug)]

0 commit comments

Comments
 (0)