From 262feb74a6c260cbaa230edae63f38b2e757d84a Mon Sep 17 00:00:00 2001 From: Milosz Muszynski Date: Tue, 27 Feb 2024 19:24:38 +0100 Subject: [PATCH] rusk: fixed clippy errors --- rusk/src/bin/config/chain.rs | 2 +- rusk/src/lib/chain/vm/migration.rs | 14 ++++++-------- rusk/tests/common/state.rs | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/rusk/src/bin/config/chain.rs b/rusk/src/bin/config/chain.rs index 6d910b5fb..3ae2da1d2 100644 --- a/rusk/src/bin/config/chain.rs +++ b/rusk/src/bin/config/chain.rs @@ -30,7 +30,7 @@ impl ChainConfig { } // Override config migration_height - if let Some(migration_height) = args.migration_height.clone() { + if let Some(migration_height) = args.migration_height { self.migration_height = Some(migration_height) } } diff --git a/rusk/src/lib/chain/vm/migration.rs b/rusk/src/lib/chain/vm/migration.rs index 687455cb1..28690d038 100644 --- a/rusk/src/lib/chain/vm/migration.rs +++ b/rusk/src/lib/chain/vm/migration.rs @@ -80,14 +80,12 @@ impl Migration { MIGRATION_GAS_LIMIT, )? .data; - session - .call::<_, ()>( - new_contract, - "set_slashed_amount", - &slashed_amount, - MIGRATION_GAS_LIMIT, - )? - .data; + session.call::<_, ()>( + new_contract, + "set_slashed_amount", + &slashed_amount, + MIGRATION_GAS_LIMIT, + )?; Ok(()) } diff --git a/rusk/tests/common/state.rs b/rusk/tests/common/state.rs index 212344311..74e570698 100644 --- a/rusk/tests/common/state.rs +++ b/rusk/tests/common/state.rs @@ -30,7 +30,7 @@ pub fn new_state>(dir: P, snapshot: &Snapshot) -> Result { let (_, commit_id) = state::deploy(dir, snapshot) .expect("Deploying initial state should succeed"); - let rusk = Rusk::new(dir).expect("Instantiating rusk should succeed"); + let rusk = Rusk::new(dir, None).expect("Instantiating rusk should succeed"); assert_eq!( commit_id,