fix backword compatibility #480
reviewdog [clippy] report
reported by reviewdog 🐶
Findings (0)
Filtered Findings (1)
common/token-module/src/lib.rs|82 col 47| error[E0382]: use of moved value: token_id
--> common/token-module/src/lib.rs:84:48
|
68 | token_id: TokenIdentifier,
| -------- move occurs because token_id
has type multiversx_sc::types::TokenIdentifier<<Self as multiversx_sc::contract_base::ContractBase>::Api>
, which does not implement the Copy
trait
...
82 | let _ = self.token_whitelist().insert(token_id);
| -------- value moved here
83 | if is_native_token {
84 | let _ = self.token_native().insert(token_id);
| ^^^^^^^^ value used here after move
|
help: consider cloning the value if the performance cost is acceptable
|
82 | let _ = self.token_whitelist().insert(token_id.clone());
| ++++++++