From 69656647c53659621693f73798ecd4e1e983bf5d Mon Sep 17 00:00:00 2001 From: Gilad Chase Date: Tue, 5 Nov 2024 20:25:10 +0200 Subject: [PATCH] chore: add lints to papyrus_test_utils Lior banned `as` repo-wide, unless absolutely necessary. --- crates/papyrus_test_utils/Cargo.toml | 3 +++ crates/papyrus_test_utils/src/lib.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/papyrus_test_utils/Cargo.toml b/crates/papyrus_test_utils/Cargo.toml index f734d04909..18783487d6 100644 --- a/crates/papyrus_test_utils/Cargo.toml +++ b/crates/papyrus_test_utils/Cargo.toml @@ -25,3 +25,6 @@ starknet_api = { workspace = true, features = ["testing"] } [dev-dependencies] pretty_assertions.workspace = true + +[lints] +workspace = true diff --git a/crates/papyrus_test_utils/src/lib.rs b/crates/papyrus_test_utils/src/lib.rs index 12daf989e0..eef6a4d1f6 100644 --- a/crates/papyrus_test_utils/src/lib.rs +++ b/crates/papyrus_test_utils/src/lib.rs @@ -284,7 +284,7 @@ fn get_rand_test_body_with_events( while is_v3_transaction(&transaction) { transaction = Transaction::get_test_instance(rng); } - transaction_hashes.push(TransactionHash(StarkHash::from(i as u128))); + transaction_hashes.push(TransactionHash(StarkHash::from(u128::try_from(i).unwrap()))); let transaction_output = get_test_transaction_output(&transaction); transactions.push(transaction); transaction_outputs.push(transaction_output);