From d26395b05ca7ac2f2b9bdf402be4604c6c48a34f Mon Sep 17 00:00:00 2001 From: Gleb Date: Fri, 20 Dec 2024 12:16:13 -0800 Subject: [PATCH] clippy --- cmd/crates/soroban-test/tests/it/build.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cmd/crates/soroban-test/tests/it/build.rs b/cmd/crates/soroban-test/tests/it/build.rs index a2b771cce..1bdfeadd1 100644 --- a/cmd/crates/soroban-test/tests/it/build.rs +++ b/cmd/crates/soroban-test/tests/it/build.rs @@ -180,23 +180,22 @@ fn with_flags(expected: &str) -> String { let registry_prefix = format!("{cargo_home}/registry/src/"); let vec: Vec<_> = if env::var("RUSTFLAGS").is_ok() { - expected.split("\n").map(|x| x.to_string()).collect() + expected.split('\n').map(ToString::to_string).collect() } else { expected - .split("\n") + .split('\n') .map(|x| { format!( - "CARGO_BUILD_RUSTFLAGS=--remap-path-prefix={}= {}", - registry_prefix, x + "CARGO_BUILD_RUSTFLAGS=--remap-path-prefix={registry_prefix}= {x}", ) }) .collect() }; - return format!( + format!( "\ {} ", vec.join("\n") - ); + ) }