Remove unnecessary to_string for clone

This commit is contained in:
Luke Parker
2025-08-30 18:08:08 -04:00
parent 3158590675
commit c69841710a
4 changed files with 4 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
fn main() {
let artifacts_path = std::env::var("OUT_DIR").unwrap().to_string() + "/ethereum-schnorr-contract";
let artifacts_path = std::env::var("OUT_DIR").unwrap().clone() + "/ethereum-schnorr-contract";
build_solidity_contracts::build(&[], "contracts", &artifacts_path).unwrap();
}

View File

@@ -1,5 +1,5 @@
fn main() {
let artifacts_path =
std::env::var("OUT_DIR").unwrap().to_string() + "/serai-processor-ethereum-deployer";
std::env::var("OUT_DIR").unwrap().clone() + "/serai-processor-ethereum-deployer";
build_solidity_contracts::build(&[], "contracts", &artifacts_path).unwrap();
}

View File

@@ -19,8 +19,7 @@ fn sol(sol_files: &[&str], file: &str) {
}
fn main() {
let artifacts_path =
env::var("OUT_DIR").unwrap().to_string() + "/serai-processor-ethereum-router";
let artifacts_path = env::var("OUT_DIR").unwrap().clone() + "/serai-processor-ethereum-router";
if !fs::exists(&artifacts_path).unwrap() {
fs::create_dir(&artifacts_path).unwrap();

View File

@@ -87,7 +87,7 @@ async fn main() {
TransactionPublisher::new(db, provider, {
let relayer_hostname = env::var("ETHEREUM_RELAYER_HOSTNAME")
.expect("ethereum relayer hostname wasn't specified")
.to_string();
.clone();
let relayer_port =
env::var("ETHEREUM_RELAYER_PORT").expect("ethereum relayer port wasn't specified");
relayer_hostname + ":" + &relayer_port