Fix broken links and add new sections on README.md #5
reviewdog [clippy] report
reported by reviewdog 🐶
Findings (0)
Filtered Findings (130)
sdk/core/src/blockchain.rs|9 col 9| warning: unused imports: ArgCreateTransaction
, SendTransactionsResponse
--> sdk/core/src/blockchain.rs:9:9
|
9 | ArgCreateTransaction, ResponseTxCost, SendTransactionResponse, SendTransactionsResponse,
| ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)]
on by default
sdk/core/src/blockchain.rs|15 col 5| warning: unused import: itertools::Itertools
--> sdk/core/src/blockchain.rs:15:5
|
15 | use itertools::Itertools;
| ^^^^^^^^^^^^^^^^^^^^
framework/derive/src/model/payable.rs|11 col 1| warning: method no_kda
is never used
--> framework/derive/src/model/payable.rs:16:12
|
11 | impl MethodPayableMetadata {
| -------------------------- method in this implementation
...
16 | pub fn no_kda(&self) -> bool {
| ^^^^^^
|
= note: #[warn(dead_code)]
on by default
vm/src/tx_execution/builtin_function_mocks/general/klever_asset_trigger_mock.rs|4 col 58| warning: unused import: TxLog
--> vm/src/tx_execution/builtin_function_mocks/general/klever_asset_trigger_mock.rs:4:58
|
4 | use crate::tx_mock::{BlockchainUpdate, TxCache, TxInput, TxLog, TxResult};
| ^^^^^
|
= note: #[warn(unused_imports)]
on by default
vm/src/tx_execution/exec_call.rs|11 col 5| warning: unused import: num_bigint::BigUint
--> vm/src/tx_execution/exec_call.rs:11:5
|
11 | use num_bigint::BigUint;
| ^^^^^^^^^^^^^^^^^^^
vm/src/tx_execution/exec_call.rs|12 col 5| warning: unused import: num_traits::Zero
--> vm/src/tx_execution/exec_call.rs:12:5
|
12 | use num_traits::Zero;
| ^^^^^^^^^^^^^^^^
vm/src/world_mock/blockchain_state.rs|4 col 5| warning: unused import: num_traits::Zero
--> vm/src/world_mock/blockchain_state.rs:4:5
|
4 | use num_traits::Zero;
| ^^^^^^^^^^^^^^^^
vm/src/vm_hooks/vh_impl/vh_debug_api.rs|191 col 1| warning: method is_back_transfer
is never used
--> vm/src/vm_hooks/vh_impl/vh_debug_api.rs:229:8
|
191 | impl DebugApiVMHooksHandler {
| --------------------------- method in this implementation
...
229 | fn is_back_transfer(&self, tx_input: &TxInput) -> bool {
| ^^^^^^^^^^^^^^^^
|
= note: #[warn(dead_code)]
on by default
vm/src/vm_hooks/vh_handler/vh_blockchain.rs|144 col 5| warning: this function has too many arguments (10/7)
--> vm/src/vm_hooks/vh_handler/vh_blockchain.rs:144:5
|
144 | / fn reset_user_kda_values(
145 | | &self,
146 | | address_handle: RawHandle,
147 | | ticker_handle: RawHandle,
... |
154 | | metadata_handle: RawHandle,
155 | | ) {
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: #[warn(clippy::too_many_arguments)]
on by default
framework/derive/src/model/payable.rs|11 col 1| warning: method no_kda
is never used
--> framework/derive/src/model/payable.rs:16:12
|
11 | impl MethodPayableMetadata {
| -------------------------- method in this implementation
...
16 | pub fn no_kda(&self) -> bool {
| ^^^^^^
|
= note: #[warn(dead_code)]
on by default
framework/derive/src/model/payable.rs|11 col 1| warning: method no_kda
is never used
--> framework/derive/src/model/payable.rs:16:12
|
11 | impl MethodPayableMetadata {
| -------------------------- method in this implementation
...
16 | pub fn no_kda(&self) -> bool {
| ^^^^^^
|
= note: #[warn(dead_code)]
on by default
framework/base/src/contract_base/wrappers/blockchain_wrapper.rs|6 col 80| warning: unused imports: ManagedTypeApiImpl
, StorageReadApiImpl
, StorageReadApi
, self
--> framework/base/src/contract_base/wrappers/blockchain_wrapper.rs:6:80
|
6 | ErrorApiImpl, HandleConstraints, ManagedBufferApiImpl, ManagedTypeApi, ManagedTypeApiImpl,
| ^^^^^^^^^^^^^^^^^^
7 | StaticVarApiImpl, StorageReadApi, StorageReadApiImpl,
| ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
...
11 | storage::{self},
| ^^^^
|
= note: #[warn(unused_imports)]
on by default
framework/base/src/contract_base/wrappers/blockchain_wrapper.rs|293 col 13| warning: redundant field names in struct initialization
--> framework/base/src/contract_base/wrappers/blockchain_wrapper.rs:293:13
|
293 | balance: balance,
| ^^^^^^^^^^^^^^^^ help: replace it with: balance
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
= note: #[warn(clippy::redundant_field_names)]
on by default
framework/base/src/types/interaction/contract_call_with_any_payment.rs|6 col 9| warning: unused import: BigUint
--> framework/base/src/types/interaction/contract_call_with_any_payment.rs:6:9
|
6 | BigUint, KdaTokenPayment, KlvOrMultiKdaPayment, ManagedAddress, ManagedBuffer, ManagedVec,
| ^^^^^^^
framework/base/src/types/managed/wrapped/kda_token_data.rs|205 col 13| warning: redundant field names in struct initialization
--> framework/base/src/types/managed/wrapped/kda_token_data.rs:205:13
|
205 | market_percentage: market_percentage,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: market_percentage
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
framework/base/src/types/managed/wrapped/kda_token_data.rs|209 col 13| warning: redundant field names in struct initialization
--> framework/base/src/types/managed/wrapped/kda_token_data.rs:209:13
|
209 | ito_percentage: ito_percentage,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: ito_percentage
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
framework/base/src/contract_base/wrappers/blockchain_wrapper.rs|6 col 80| warning: unused imports: ManagedTypeApiImpl
, StorageReadApiImpl
, StorageReadApi
, self
--> framework/base/src/contract_base/wrappers/blockchain_wrapper.rs:6:80
|
6 | ErrorApiImpl, HandleConstraints, ManagedBufferApiImpl, ManagedTypeApi, ManagedTypeApiImpl,
| ^^^^^^^^^^^^^^^^^^
7 | StaticVarApiImpl, StorageReadApi, StorageReadApiImpl,
| ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
...
11 | storage::{self},
| ^^^^
|
= note: #[warn(unused_imports)]
on by default
framework/base/src/contract_base/wrappers/blockchain_wrapper.rs|293 col 13| warning: redundant field names in struct initialization
--> framework/base/src/contract_base/wrappers/blockchain_wrapper.rs:293:13
|
293 | balance: balance,
| ^^^^^^^^^^^^^^^^ help: replace it with: balance
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
= note: #[warn(clippy::redundant_field_names)]
on by default
framework/base/src/types/interaction/contract_call_with_any_payment.rs|6 col 9| warning: unused import: BigUint
--> framework/base/src/types/interaction/contract_call_with_any_payment.rs:6:9
|
6 | BigUint, KdaTokenPayment, KlvOrMultiKdaPayment, ManagedAddress, ManagedBuffer, ManagedVec,
| ^^^^^^^
framework/base/src/types/managed/wrapped/kda_token_data.rs|205 col 13| warning: redundant field names in struct initialization
--> framework/base/src/types/managed/wrapped/kda_token_data.rs:205:13
|
205 | market_percentage: market_percentage,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: market_percentage
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
framework/base/src/types/managed/wrapped/kda_token_data.rs|209 col 13| warning: redundant field names in struct initialization
--> framework/base/src/types/managed/wrapped/kda_token_data.rs:209:13
|
209 | ito_percentage: ito_percentage,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: ito_percentage
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
vm/src/tx_execution/builtin_function_mocks/general/klever_asset_trigger_mock.rs|4 col 58| warning: unused import: TxLog
--> vm/src/tx_execution/builtin_function_mocks/general/klever_asset_trigger_mock.rs:4:58
|
4 | use crate::tx_mock::{BlockchainUpdate, TxCache, TxInput, TxLog, TxResult};
| ^^^^^
|
= note: #[warn(unused_imports)]
on by default
vm/src/tx_execution/exec_call.rs|11 col 5| warning: unused import: num_bigint::BigUint
--> vm/src/tx_execution/exec_call.rs:11:5
|
11 | use num_bigint::BigUint;
| ^^^^^^^^^^^^^^^^^^^
vm/src/tx_execution/exec_call.rs|12 col 5| warning: unused import: num_traits::Zero
--> vm/src/tx_execution/exec_call.rs:12:5
|
12 | use num_traits::Zero;
| ^^^^^^^^^^^^^^^^
vm/src/world_mock/blockchain_state.rs|4 col 5| warning: unused import: num_traits::Zero
--> vm/src/world_mock/blockchain_state.rs:4:5
|
4 | use num_traits::Zero;
| ^^^^^^^^^^^^^^^^
vm/src/vm_hooks/vh_impl/vh_debug_api.rs|191 col 1| warning: method is_back_transfer
is never used
--> vm/src/vm_hooks/vh_impl/vh_debug_api.rs:229:8
|
191 | impl DebugApiVMHooksHandler {
| --------------------------- method in this implementation
...
229 | fn is_back_transfer(&self, tx_input: &TxInput) -> bool {
| ^^^^^^^^^^^^^^^^
|
= note: #[warn(dead_code)]
on by default
framework/base/src/contract_base/wrappers/call_value_wrapper.rs|117 col 18| warning: useless conversion to the same type: types::managed::wrapped::kda_token_payment::KdaTokenPayment<A>
--> framework/base/src/contract_base/wrappers/call_value_wrapper.rs:117:18
|
117 | 1 => kda_transfers.get(0).into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing .into()
: kda_transfers.get(0)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: #[warn(clippy::useless_conversion)]
on by default
framework/base/src/contract_base/wrappers/send_wrapper.rs|204 col 58| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> framework/base/src/contract_base/wrappers/send_wrapper.rs:204:58
|
204 | self.kda_mint_with_address(token, nonce, amount, &address, max_supply)
| ^^^^^^^^ help: change this to: address
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: #[warn(clippy::needless_borrow)]
on by default
vm/src/vm_hooks/vh_handler/vh_blockchain.rs|144 col 5| warning: this function has too many arguments (10/7)
--> vm/src/vm_hooks/vh_handler/vh_blockchain.rs:144:5
|
144 | / fn reset_user_kda_values(
145 | | &self,
146 | | address_handle: RawHandle,
147 | | ticker_handle: RawHandle,
... |
154 | | metadata_handle: RawHandle,
155 | | ) {
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: #[warn(clippy::too_many_arguments)]
on by default
framework/base/src/contract_base/wrappers/send_wrapper.rs|587 col 5| warning: this function has too many arguments (11/7)
--> framework/base/src/contract_base/wrappers/send_wrapper.rs:587:5
|
587 | / pub fn kda_create(
588 | | &self,
589 | | asset_type: AssetType,
590 | | name: &ManagedBuffer,
... |
598 | | royalties: &RoyaltiesData,
599 | | ) -> TokenIdentifier {
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: #[warn(clippy::too_many_arguments)]
on by default
framework/base/src/contract_base/wrappers/send_wrapper.rs|782 col 5| warning: this function has too many arguments (9/7)
--> framework/base/src/contract_base/wrappers/send_wrapper.rs:782:5
|
782 | / pub fn sell(
783 | | &self,
784 | | sell_type: SellType,
785 | | marketplace_id: &ManagedBuffer,
... |
791 | | end_time: u64,
792 | | ) -> ManagedBuffer{
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
framework/base/src/contract_base/wrappers/send_wrapper.rs|997 col 5| warning: this function has too many arguments (13/7)
--> framework/base/src/contract_base/wrappers/send_wrapper.rs:997:5
|
997 | / pub fn ito_config(
998 | | &self,
999 | | token: &TokenIdentifier,
1000 | | receiver: &ManagedAddress,
... |
1010 | | packs: &ManagedVec<A, ITOPackInfo>,
1011 | | ) -> ManagedVec<A, ManagedBuffer> {
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
framework/base/src/kda/system_sc_proxy.rs|104 col 5| warning: this function has too many arguments (8/7)
--> framework/base/src/kda/system_sc_proxy.rs:104:5
|
104 | / fn issue(
105 | | self,
106 | | token_type: KdaTokenType,
107 | | token_display_name: &ManagedBuffer,
... |
112 | | properties: &PropertiesInfo,
113 | | ) -> TokenIdentifier {
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
framework/base/src/kda/system_sc_proxy.rs|122 col 9| warning: returning the result of a let
binding from a block
--> framework/base/src/kda/system_sc_proxy.rs:135:9
|
122 | / let result = send_wrapper.kda_create(
123 | | asset_type,
124 | | token_display_name,
125 | | token_ticker,
... |
132 | | &RoyaltiesData::default(),
133 | | );
| |- unnecessary let
binding
134 |
135 | result
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: #[warn(clippy::let_and_return)]
on by default
help: return the expression directly
|
122 ~
123 |
124 ~ send_wrapper.kda_create(
125 + asset_type,
126 + token_display_name,
127 + token_ticker,
128 + num_decimals,
129 + &Self::get_sc_address(),
130 + &ManagedBuffer::new(),
131 + initial_supply,
132 + max_supply,
133 + properties,
134 + &RoyaltiesData::default(),
135 + )
|
framework/base/src/kda/system_sc_proxy.rs|167 col 31| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> framework/base/src/kda/system_sc_proxy.rs:167:31
|
167 | send_wrapper.kda_burn(&token_identifier, 0, &amount);
| ^^^^^^^^^^^^^^^^^ help: change this to: token_identifier
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
framework/base/src/kda/system_sc_proxy.rs|167 col 53| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> framework/base/src/kda/system_sc_proxy.rs:167:53
|
167 | send_wrapper.kda_burn(&token_identifier, 0, &amount);
| ^^^^^^^ help: change this to: amount
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
framework/base/src/kda/system_sc_proxy.rs|180 col 33| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> framework/base/src/kda/system_sc_proxy.rs:180:33
|
180 | send_wrapper.kda_resume(&token_identifier)
| ^^^^^^^^^^^^^^^^^ help: change this to: token_identifier
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
framework/base/src/contract_base/wrappers/call_value_wrapper.rs|117 col 18| warning: useless conversion to the same type: types::managed::wrapped::kda_token_payment::KdaTokenPayment<A>
--> framework/base/src/contract_base/wrappers/call_value_wrapper.rs:117:18
|
117 | 1 => kda_transfers.get(0).into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing .into()
: kda_transfers.get(0)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: #[warn(clippy::useless_conversion)]
on by default
framework/base/src/contract_base/wrappers/send_wrapper.rs|204 col 58| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> framework/base/src/contract_base/wrappers/send_wrapper.rs:204:58
|
204 | self.kda_mint_with_address(token, nonce, amount, &address, max_supply)
| ^^^^^^^^ help: change this to: address
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: #[warn(clippy::needless_borrow)]
on by default
framework/base/src/contract_base/wrappers/send_wrapper.rs|587 col 5| warning: this function has too many arguments (11/7)
--> framework/base/src/contract_base/wrappers/send_wrapper.rs:587:5
|
587 | / pub fn kda_create(
588 | | &self,
589 | | asset_type: AssetType,
590 | | name: &ManagedBuffer,
... |
598 | | royalties: &RoyaltiesData,
599 | | ) -> TokenIdentifier {
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: #[warn(clippy::too_many_arguments)]
on by default
framework/base/src/contract_base/wrappers/send_wrapper.rs|782 col 5| warning: this function has too many arguments (9/7)
--> framework/base/src/contract_base/wrappers/send_wrapper.rs:782:5
|
782 | / pub fn sell(
783 | | &self,
784 | | sell_type: SellType,
785 | | marketplace_id: &ManagedBuffer,
... |
791 | | end_time: u64,
792 | | ) -> ManagedBuffer{
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
framework/base/src/contract_base/wrappers/send_wrapper.rs|997 col 5| warning: this function has too many arguments (13/7)
--> framework/base/src/contract_base/wrappers/send_wrapper.rs:997:5
|
997 | / pub fn ito_config(
998 | | &self,
999 | | token: &TokenIdentifier,
1000 | | receiver: &ManagedAddress,
... |
1010 | | packs: &ManagedVec<A, ITOPackInfo>,
1011 | | ) -> ManagedVec<A, ManagedBuffer> {
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
framework/base/src/storage/mappers/token/non_fungible_token_mapper.rs|113 col 41| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> framework/base/src/storage/mappers/token/non_fungible_token_mapper.rs:113:41
|
113 | system_sc_proxy.mint(&token_id, &amount)
| ^^^^^^^ help: change this to: amount
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
framework/base/src/kda/system_sc_proxy.rs|104 col 5| warning: this function has too many arguments (8/7)
--> framework/base/src/kda/system_sc_proxy.rs:104:5
|
104 | / fn issue(
105 | | self,
106 | | token_type: KdaTokenType,
107 | | token_display_name: &ManagedBuffer,
... |
112 | | properties: &PropertiesInfo,
113 | | ) -> TokenIdentifier {
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
framework/base/src/kda/system_sc_proxy.rs|122 col 9| warning: returning the result of a let
binding from a block
--> framework/base/src/kda/system_sc_proxy.rs:135:9
|
122 | / let result = send_wrapper.kda_create(
123 | | asset_type,
124 | | token_display_name,
125 | | token_ticker,
... |
132 | | &RoyaltiesData::default(),
133 | | );
| |- unnecessary let
binding
134 |
135 | result
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: #[warn(clippy::let_and_return)]
on by default
help: return the expression directly
|
122 ~
123 |
124 ~ send_wrapper.kda_create(
125 + asset_type,
126 + token_display_name,
127 + token_ticker,
128 + num_decimals,
129 + &Self::get_sc_address(),
130 + &ManagedBuffer::new(),
131 + initial_supply,
132 + max_supply,
133 + properties,
134 + &RoyaltiesData::default(),
135 + )
|
framework/base/src/kda/system_sc_proxy.rs|167 col 31| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> framework/base/src/kda/system_sc_proxy.rs:167:31
|
167 | send_wrapper.kda_burn(&token_identifier, 0, &amount);
| ^^^^^^^^^^^^^^^^^ help: change this to: token_identifier
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
framework/base/src/kda/system_sc_proxy.rs|167 col 53| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> framework/base/src/kda/system_sc_proxy.rs:167:53
|
167 | send_wrapper.kda_burn(&token_identifier, 0, &amount);
| ^^^^^^^ help: change this to: amount
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
framework/base/src/kda/system_sc_proxy.rs|180 col 33| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> framework/base/src/kda/system_sc_proxy.rs:180:33
|
180 | send_wrapper.kda_resume(&token_identifier)
| ^^^^^^^^^^^^^^^^^ help: change this to: token_identifier
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
sdk/core/src/blockchain.rs|9 col 9| warning: unused imports: ArgCreateTransaction
, SendTransactionsResponse
--> sdk/core/src/blockchain.rs:9:9
|
9 | ArgCreateTransaction, ResponseTxCost, SendTransactionResponse, SendTransactionsResponse,
| ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)]
on by default
sdk/core/src/blockchain.rs|15 col 5| warning: unused import: itertools::Itertools
--> sdk/core/src/blockchain.rs:15:5
|
15 | use itertools::Itertools;
| ^^^^^^^^^^^^^^^^^^^^
framework/base/src/types/interaction/contract_call_exec.rs|146 col 9| warning: this let-binding has unit value
--> framework/base/src/types/interaction/contract_call_exec.rs:146:9
|
146 | let _ = self.transfer_execute_multi_kda(payments);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the let
binding: self.transfer_execute_multi_kda(payments);
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: #[warn(clippy::let_unit_value)]
on by default
framework/base/src/storage/mappers/token/non_fungible_token_mapper.rs|113 col 41| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> framework/base/src/storage/mappers/token/non_fungible_token_mapper.rs:113:41
|
113 | system_sc_proxy.mint(&token_id, &amount)
| ^^^^^^^ help: change this to: amount
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
framework/base/src/types/interaction/contract_call_exec.rs|146 col 9| warning: this let-binding has unit value
--> framework/base/src/types/interaction/contract_call_exec.rs:146:9
|
146 | let _ = self.transfer_execute_multi_kda(payments);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the let
binding: self.transfer_execute_multi_kda(payments);
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: #[warn(clippy::let_unit_value)]
on by default
framework/base/src/types/managed/wrapped/kda_token_data.rs|50 col 1| warning: this impl
can be derived
--> framework/base/src/types/managed/wrapped/kda_token_data.rs:50:1
|
50 | / impl Default for StakingInfo {
51 | | fn default() -> Self {
52 | | StakingInfo {
53 | | interest_type: 0,
... |
59 | | }
60 | | }
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
= note: #[warn(clippy::derivable_impls)]
on by default
= help: remove the manual implementation...
help: ...and instead derive it
|
42 + #[derive(Default)]
43 | pub struct StakingInfo {
|
framework/base/src/types/managed/wrapped/kda_token_data.rs|101 col 17| warning: unneeded return
statement
--> framework/base/src/types/managed/wrapped/kda_token_data.rs:101:17
|
101 | return PropertiesInfo::from(value)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: #[warn(clippy::needless_return)]
on by default
help: remove return
|
101 | PropertiesInfo::from(value)
|
framework/base/src/types/managed/wrapped/kda_token_data.rs|146 col 1| warning: this impl
can be derived
--> framework/base/src/types/managed/wrapped/kda_token_data.rs:146:1
|
146 | / impl Default for AttributesInfo {
147 | | fn default() -> Self {
148 | | AttributesInfo {
149 | | is_paused: false,
... |
154 | | }
155 | | }
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
= help: remove the manual implementation...
help: ...and instead derive it
|
124 + #[derive(Default)]
125 | pub struct AttributesInfo {
|
framework/base/src/types/managed/wrapped/kda_token_data.rs|210 col 15| warning: struct update has no effect, all the fields in the struct have already been specified
--> framework/base/src/types/managed/wrapped/kda_token_data.rs:210:15
|
210 | ..Default::default()
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update
= note: #[warn(clippy::needless_update)]
on by default
framework/base/src/types/managed/wrapped/kda_token_data.rs|50 col 1| warning: this impl
can be derived
--> framework/base/src/types/managed/wrapped/kda_token_data.rs:50:1
|
50 | / impl Default for StakingInfo {
51 | | fn default() -> Self {
52 | | StakingInfo {
53 | | interest_type: 0,
... |
59 | | }
60 | | }
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
= note: #[warn(clippy::derivable_impls)]
on by default
= help: remove the manual implementation...
help: ...and instead derive it
|
42 + #[derive(Default)]
43 | pub struct StakingInfo {
|
framework/base/src/types/managed/wrapped/kda_token_data.rs|101 col 17| warning: unneeded return
statement
--> framework/base/src/types/managed/wrapped/kda_token_data.rs:101:17
|
101 | return PropertiesInfo::from(value)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: #[warn(clippy::needless_return)]
on by default
help: remove return
|
101 | PropertiesInfo::from(value)
|
framework/base/src/types/managed/wrapped/kda_token_data.rs|146 col 1| warning: this impl
can be derived
--> framework/base/src/types/managed/wrapped/kda_token_data.rs:146:1
|
146 | / impl Default for AttributesInfo {
147 | | fn default() -> Self {
148 | | AttributesInfo {
149 | | is_paused: false,
... |
154 | | }
155 | | }
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
= help: remove the manual implementation...
help: ...and instead derive it
|
124 + #[derive(Default)]
125 | pub struct AttributesInfo {
|
framework/base/src/types/managed/wrapped/kda_token_data.rs|210 col 15| warning: struct update has no effect, all the fields in the struct have already been specified
--> framework/base/src/types/managed/wrapped/kda_token_data.rs:210:15
|
210 | ..Default::default()
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update
= note: #[warn(clippy::needless_update)]
on by default
framework/scenario/src/scenario/model/transaction/tx_kda.rs|1 col 5| warning: unused import: klever_sc::types::BigUint
--> framework/scenario/src/scenario/model/transaction/tx_kda.rs:1:5
|
1 | use klever_sc::types::BigUint;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)]
on by default
framework/scenario/src/scenario/run_vm/sc_call.rs|11 col 5| warning: unused import: num_bigint::BigUint
--> framework/scenario/src/scenario/run_vm/sc_call.rs:11:5
|
11 | use num_bigint::BigUint;
| ^^^^^^^^^^^^^^^^^^^
framework/scenario/src/scenario/run_vm/sc_call.rs|12 col 5| warning: unused import: num_traits::Zero
--> framework/scenario/src/scenario/run_vm/sc_call.rs:12:5
|
12 | use num_traits::Zero;
| ^^^^^^^^^^^^^^^^
framework/scenario/src/scenario/model/transaction/tx_response.rs|11 col 7| warning: constant LOG_IDENTIFIER_SC_DEPLOY
is never used
--> framework/scenario/src/scenario/model/transaction/tx_response.rs:11:7
|
11 | const LOG_IDENTIFIER_SC_DEPLOY: &str = "SCDeploy";
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(dead_code)]
on by default
framework/scenario/src/scenario/model/transaction/tx_response.rs|12 col 7| warning: constant LOG_IDENTIFIER_SIGNAL_ERROR
is never used
--> framework/scenario/src/scenario/model/transaction/tx_response.rs:12:7
|
12 | const LOG_IDENTIFIER_SIGNAL_ERROR: &str = "signalError";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
framework/scenario/src/scenario/model/transaction/tx_response.rs|14 col 7| warning: constant SYSTEM_SC_BECH32
is never used
--> framework/scenario/src/scenario/model/transaction/tx_response.rs:14:7
|
14 | const SYSTEM_SC_BECH32: &str = "klv1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzllls8a5w6u";
| ^^^^^^^^^^^^^^^^
framework/scenario/src/scenario/model/transaction/tx_response.rs|39 col 1| warning: methods process_signal_error
, process
, process_out
, process_new_deployed_address
, process_new_issued_token_identifier
, and find_log
are never used
--> framework/scenario/src/scenario/model/transaction/tx_response.rs:88:8
|
39 | impl TxResponse {
| --------------- methods in this implementation
...
88 | fn process_signal_error(&self) -> TxResponseStatus {
| ^^^^^^^^^^^^^^^^^^^^
...
103 | fn process(self) -> Self {
| ^^^^^^^
...
109 | fn process_out(mut self) -> Self {
| ^^^^^^^^^^^
...
119 | fn process_new_deployed_address(mut self) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
134 | fn process_new_issued_token_identifier(mut self) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
156 | fn find_log(&self, log_identifier: &str) -> Option<&Events> {
| ^^^^^^^^
framework/scenario/src/scenario/model/transaction/tx_response_status.rs|10 col 1| warning: associated functions new
and signal_error
are never used
--> framework/scenario/src/scenario/model/transaction/tx_response_status.rs:12:19
|
10 | impl TxResponseStatus {
| --------------------- associated functions in this implementation
11 | /// Creates a [TxResponseStatus
]
12 | pub(crate) fn new(status: u64, message: &str) -> Self {
| ^^^
...
20 | pub(crate) fn signal_error(message: &str) -> Self {
| ^^^^^^^^^^^^
framework/scenario/src/scenario/model/kda_data/kda_instance.rs|56 col 45| warning: useless conversion to the same type: bool
--> framework/scenario/src/scenario/model/kda_data/kda_instance.rs:56:45
|
56 | can_burn: from.can_burn.map(|b| b.into()),
| ^^^^^^^^ help: consider removing .into()
: b
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: #[warn(clippy::useless_conversion)]
on by default
framework/scenario/src/scenario/model/kda_data/kda_instance.rs|71 col 47| warning: useless conversion to the same type: bool
--> framework/scenario/src/scenario/model/kda_data/kda_instance.rs:71:47
|
71 | can_burn: self.can_burn.map(| b | b.into()),
| ^^^^^^^^ help: consider removing .into()
: b
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
framework/scenario/src/scenario/run_vm/set_state.rs|162 col 23| warning: you are using an explicit closure for copying elements
--> framework/scenario/src/scenario/run_vm/set_state.rs:162:23
|
162 | can_burn: scenario_kda.can_burn.as_ref()
| ^
163 | | .map(|m| m.clone())
| |____________^ help: consider calling the dedicated copied
method: scenario_kda.can_burn.as_ref().copied()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
= note: #[warn(clippy::map_clone)]
on by default
framework/scenario/src/scenario/run_vm/set_state.rs|163 col 26| warning: using clone
on type bool
which implements the Copy
trait
--> framework/scenario/src/scenario/run_vm/set_state.rs:163:26
|
163 | .map(|m| m.clone())
| ^^^^^^^^^ help: try dereferencing it: *m
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: #[warn(clippy::clone_on_copy)]
on by default
contracts/examples/dice/src/dice_utils.rs|32 col 12| warning: this else { if .. }
block can be collapsed
--> contracts/examples/dice/src/dice_utils.rs:32:12
|
32 | } else {
| _______^
33 | | if dice_value >= bet_value {
34 | | is_winner = true
35 | | }
36 | | }
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: #[warn(clippy::collapsible_else_if)]
on by default
help: collapse nested if block
|
32 ~ } else if dice_value >= bet_value {
33 + is_winner = true
34 + }
|
contracts/examples/dice/src/lib.rs|84 col 13| warning: redundant field names in struct initialization
--> contracts/examples/dice/src/lib.rs:84:13
|
84 | bet_value: bet_value,
| ^^^^^^^^^^^^^^^^^^^^ help: replace it with: bet_value
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
= note: #[warn(clippy::redundant_field_names)]
on by default
contracts/examples/dice/src/lib.rs|85 col 13| warning: redundant field names in struct initialization
--> contracts/examples/dice/src/lib.rs:85:13
|
85 | dice_value: dice_value,
| ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: dice_value
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
contracts/examples/dice/src/lib.rs|86 col 13| warning: redundant field names in struct initialization
--> contracts/examples/dice/src/lib.rs:86:13
|
86 | multiplier: multiplier,
| ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: multiplier
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
contracts/examples/dice/src/lib.rs|87 col 13| warning: redundant field names in struct initialization
--> contracts/examples/dice/src/lib.rs:87:13
|
87 | is_winner: is_winner,
| ^^^^^^^^^^^^^^^^^^^^ help: replace it with: is_winner
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
contracts/examples/dice/src/dice_utils.rs|22 col 5| warning: unneeded return
statement
--> contracts/examples/dice/src/dice_utils.rs:22:5
|
22 | return (payment.mul(multiplier).div(BigUint::from(100 as u32)), multiplier);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: #[warn(clippy::needless_return)]
on by default
help: remove return
|
22 - return (payment.mul(multiplier).div(BigUint::from(100 as u32)), multiplier);
22 + (payment.mul(multiplier).div(BigUint::from(100 as u32)), multiplier)
|
contracts/examples/dice/src/dice_utils.rs|22 col 55| warning: casting integer literal to u32
is unnecessary
--> contracts/examples/dice/src/dice_utils.rs:22:55
|
22 | return (payment.mul(multiplier).div(BigUint::from(100 as u32)), multiplier);
| ^^^^^^^^^^ help: try: 100_u32
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: #[warn(clippy::unnecessary_cast)]
on by default
contracts/examples/dice/src/dice_utils.rs|38 col 5| warning: unneeded return
statement
--> contracts/examples/dice/src/dice_utils.rs:38:5
|
38 | return is_winner;
| ^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove return
|
38 - return is_winner;
38 + is_winner
|
contracts/examples/dice/src/lib.rs|78 col 18| warning: useless conversion to the same type: klever_sc::types::BigUint<<Self as klever_sc::contract_base::ContractBase>::Api>
--> contracts/examples/dice/src/lib.rs:78:18
|
78 | &BigUint::from(payment_total),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing BigUint::from()
: payment_total
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: #[warn(clippy::useless_conversion)]
on by default
contracts/examples/crowdfunding/src/crowdfunding_methods.rs|28 col 30| warning: this creates an owned instance just for comparison
--> contracts/examples/crowdfunding/src/crowdfunding_methods.rs:28:30
|
28 | require!(available > BigUint::from(0u32), "Claim not available!");
| ^^^^^^^^^^^^^^^^^^^ help: try: 0u32
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned
= note: #[warn(clippy::cmp_owned)]
on by default
contracts/examples/crowdfunding/src/crowdfunding_helpers.rs|27 col 5| warning: returning the result of a let
binding from a block
--> contracts/examples/crowdfunding/src/crowdfunding_helpers.rs:29:5
|
27 | let claim_value = amount.clone().sub(final_fee.clone());
| -------------------------------------------------------- unnecessary let
binding
28 |
29 | claim_value
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: #[warn(clippy::let_and_return)]
on by default
help: return the expression directly
|
27 ~
28 |
29 ~ amount.clone().sub(final_fee.clone())
|
contracts/examples/kapps/src/kapps.rs|316 col 17| warning: redundant field names in struct initialization
--> contracts/examples/kapps/src/kapps.rs:316:17
|
316 | transfer_percentage: transfer_percentage,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: transfer_percentage
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
= note: #[warn(clippy::redundant_field_names)]
on by default
contracts/examples/dice/tests/utils_test.rs|13 col 5| warning: used assert_eq!
with a literal bool
--> contracts/examples/dice/tests/utils_test.rs:13:5
|
13 | assert_eq!(true, is_winner);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison
= note: #[warn(clippy::bool_assert_comparison)]
on by default
help: replace it with assert!(..)
|
13 - assert_eq!(true, is_winner);
13 + assert!(is_winner);
|
contracts/examples/dice/tests/utils_test.rs|22 col 5| warning: used assert_eq!
with a literal bool
--> contracts/examples/dice/tests/utils_test.rs:22:5
|
22 | assert_eq!(true, is_winner);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison
help: replace it with assert!(..)
|
22 - assert_eq!(true, is_winner);
22 + assert!(is_winner);
|
contracts/examples/dice/tests/utils_test.rs|31 col 5| warning: used assert_eq!
with a literal bool
--> contracts/examples/dice/tests/utils_test.rs:31:5
|
31 | assert_eq!(false, is_winner);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison
help: replace it with assert!(..)
|
31 - assert_eq!(false, is_winner);
31 + assert!(!is_winner);
|
contracts/examples/dice/tests/utils_test.rs|41 col 5| warning: used assert_eq!
with a literal bool
--> contracts/examples/dice/tests/utils_test.rs:41:5
|
41 | assert_eq!(true, is_winner);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison
help: replace it with assert!(..)
|
41 - assert_eq!(true, is_winner);
41 + assert!(is_winner);
|
contracts/examples/dice/tests/utils_test.rs|50 col 5| warning: used assert_eq!
with a literal bool
--> contracts/examples/dice/tests/utils_test.rs:50:5
|
50 | assert_eq!(true, is_winner);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison
help: replace it with assert!(..)
|
50 - assert_eq!(true, is_winner);
50 + assert!(is_winner);
|
contracts/examples/dice/tests/utils_test.rs|59 col 5| warning: used assert_eq!
with a literal bool
--> contracts/examples/dice/tests/utils_test.rs:59:5
|
59 | assert_eq!(false, is_winner);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison
help: replace it with assert!(..)
|
59 - assert_eq!(false, is_winner);
59 + assert!(!is_winner);
|
framework/scenario/tests/kda_token_payment_test.rs|2 col 19| warning: unused imports: BigUint
, DefaultErrorHandler
, TokenIdentifier
, TopEncode
--> framework/scenario/tests/kda_token_payment_test.rs:2:19
|
2 | codec::{self, DefaultErrorHandler, TopEncode},
| ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^
3 | types::{BigUint, KdaTokenPayment, TokenIdentifier},
| ^^^^^^^ ^^^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)]
on by default
framework/scenario/tests/kda_token_payment_test.rs|8 col 4| warning: function kda_token_payment_regular_top_decode_or_handle_err
is never used
--> framework/scenario/tests/kda_token_payment_test.rs:8:4
|
8 | fn kda_token_payment_regular_top_decode_or_handle_err<I, H>(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(dead_code)]
on by default
contracts/examples/dice/src/dice_utils.rs|32 col 12| warning: this else { if .. }
block can be collapsed
--> contracts/examples/dice/src/dice_utils.rs:32:12
|
32 | } else {
| _______^
33 | | if dice_value >= bet_value {
34 | | is_winner = true
35 | | }
36 | | }
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: #[warn(clippy::collapsible_else_if)]
on by default
help: collapse nested if block
|
32 ~ } else if dice_value >= bet_value {
33 + is_winner = true
34 + }
|
contracts/examples/dice/src/lib.rs|84 col 13| warning: redundant field names in struct initialization
--> contracts/examples/dice/src/lib.rs:84:13
|
84 | bet_value: bet_value,
| ^^^^^^^^^^^^^^^^^^^^ help: replace it with: bet_value
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
= note: #[warn(clippy::redundant_field_names)]
on by default
contracts/examples/dice/src/lib.rs|85 col 13| warning: redundant field names in struct initialization
--> contracts/examples/dice/src/lib.rs:85:13
|
85 | dice_value: dice_value,
| ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: dice_value
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
contracts/examples/dice/src/lib.rs|86 col 13| warning: redundant field names in struct initialization
--> contracts/examples/dice/src/lib.rs:86:13
|
86 | multiplier: multiplier,
| ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: multiplier
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
contracts/examples/dice/src/lib.rs|87 col 13| warning: redundant field names in struct initialization
--> contracts/examples/dice/src/lib.rs:87:13
|
87 | is_winner: is_winner,
| ^^^^^^^^^^^^^^^^^^^^ help: replace it with: is_winner
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
contracts/examples/dice/src/dice_utils.rs|22 col 5| warning: unneeded return
statement
--> contracts/examples/dice/src/dice_utils.rs:22:5
|
22 | return (payment.mul(multiplier).div(BigUint::from(100 as u32)), multiplier);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: #[warn(clippy::needless_return)]
on by default
help: remove return
|
22 - return (payment.mul(multiplier).div(BigUint::from(100 as u32)), multiplier);
22 + (payment.mul(multiplier).div(BigUint::from(100 as u32)), multiplier)
|
contracts/examples/dice/src/dice_utils.rs|22 col 55| warning: casting integer literal to u32
is unnecessary
--> contracts/examples/dice/src/dice_utils.rs:22:55
|
22 | return (payment.mul(multiplier).div(BigUint::from(100 as u32)), multiplier);
| ^^^^^^^^^^ help: try: 100_u32
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: #[warn(clippy::unnecessary_cast)]
on by default
... (Too many findings. Dropped some findings)