Skip to content

Commit

Permalink
Make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
cmichi committed Feb 25, 2025
1 parent 1622252 commit 628184d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 30 deletions.
27 changes: 0 additions & 27 deletions crates/extrinsics/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,33 +102,6 @@ where
const EVENT: &'static str = "Instantiated";
}

/// An event triggered by either the `instantiate_with_code` or the `upload_code` call.
#[derive(
Debug,
scale::Decode,
scale::Encode,
scale_decode::DecodeAsType,
scale_encode::EncodeAsType,
)]
#[decode_as_type(crate_path = "subxt::ext::scale_decode")]
#[encode_as_type(crate_path = "subxt::ext::scale_encode")]
pub struct CodeStored<Balance> {
/// Hash under which the contract code was stored.
pub code_hash: H256,
/// Deposit held for the storing contract code on-chain.
pub deposit_held: Balance,
/// Address of the uploader.
pub uploader: H160,
}

impl<Balance> StaticEvent for CodeStored<Balance>
where
Balance: IntoVisitor,
{
const PALLET: &'static str = "Revive";
const EVENT: &'static str = "CodeStored";
}

/// An event triggered by the `remove_code` call.
#[derive(
Debug,
Expand Down
3 changes: 1 addition & 2 deletions crates/extrinsics/src/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ async fn api_build_upload_remove() {
.await
.unwrap();
let upload_result = upload.upload_code().await;
let upload_result = upload_result.unwrap_or_else(|err| {
let _upload_result = upload_result.unwrap_or_else(|err| {
panic!("upload code failed with {:?}", err);
});
let code_hash_h256 = upload.code().code_hash(); // todo
Expand Down Expand Up @@ -887,7 +887,6 @@ async fn adhere_to_limits_during_build_upload_instantiate_call() {
.output()
.expect("failed to execute process");
let stderr = str::from_utf8(&output.stderr).unwrap();
let stdout = str::from_utf8(&output.stderr).unwrap();
assert!(
!output.status.success(),
"upload code succeeded, but should have failed: {stderr}"
Expand Down
1 change: 0 additions & 1 deletion crates/extrinsics/src/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// along with cargo-contract. If not, see <http://www.gnu.org/licenses/>.

use super::{
events::CodeStored,
pallet_revive_primitives::CodeUploadResult,
state_call,
submit_extrinsic,
Expand Down

0 comments on commit 628184d

Please sign in to comment.