From 0a84a90a088956760f5b3c07acbdd9b4c3c7bb39 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 6d910b5fb7..3ae2da1d21 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 687455cb19..28690d0387 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 212344311e..74e570698b 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,