From de3b6df1fa6ebabc69c8eefb34a38c390f738941 Mon Sep 17 00:00:00 2001 From: Andrei Marinica Date: Wed, 11 Dec 2024 18:25:56 +0200 Subject: [PATCH] cleanup, comments --- framework/scenario/tests/contract_without_macros.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/scenario/tests/contract_without_macros.rs b/framework/scenario/tests/contract_without_macros.rs index ccdcc493fd..d461adea6d 100644 --- a/framework/scenario/tests/contract_without_macros.rs +++ b/framework/scenario/tests/contract_without_macros.rs @@ -254,8 +254,6 @@ mod sample_adder { ///////////////////////////////////////////////////////////////////////////////////////////////// pub trait AutoImpl: multiversx_sc::contract_base::ContractBase {} - // impl super::module_1::AutoImpl for C where C: AutoImpl {} - impl Adder for C where C: AutoImpl + super::module_1::AutoImpl, @@ -639,6 +637,8 @@ mod sample_adder { A: multiversx_sc::api::VMApi, { fn call(&self, fn_name: &str) -> bool { + // creating a new object, which we can mutate + // because of dynamic traits, we cannot move `self` let mut obj = multiversx_sc::contract_base::UniversalContractObj::::new(); EndpointWrappers::call(&mut obj, fn_name) }