Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified shrink 3 #1569

Draft
wants to merge 3 commits into
base: unified-shrink-2
Choose a base branch
from

tx payment - with_normalized removed references

c30b831
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Draft

Unified shrink 3 #1569

tx payment - with_normalized removed references
c30b831
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy succeeded Apr 17, 2024 in 0s

reviewdog [clippy] report

reported by reviewdog 🐶

Findings (0)
Filtered Findings (8)

framework/base/src/types/interaction/tx.rs|646 col 9| warning: passing a unit value to a function
--> framework/base/src/types/interaction/tx.rs:646:9
|
646 | / self.payment.with_normalized(
647 | | self.env,
648 | | self.from,
649 | | self.to,
... |
660 | | },
661 | | )
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
= note: #[warn(clippy::unit_arg)] on by default
help: move the expression in front of the call and replace it with the unit literal ()
|
646 ~ self.from;
647 + self.payment.with_normalized(
648 + self.env,
649 + (),
650 + self.to,
651 + self.data,
652 + |norm_to, norm_egld, norm_fc| ContractCallWithEgld {
653 + basic: ContractCallNoPayment {
654 + phantom: core::marker::PhantomData,
655 + to: norm_to.clone_value(),
656 + function_call: norm_fc.clone(),
657 + explicit_gas_limit: UNSPECIFIED_GAS_LIMIT,
658 + return_type: core::marker::PhantomData,
659 + },
660 + egld_payment: norm_egld.clone_value(),
661 + },
662 + )
|
framework/base/src/types/interaction/tx_exec/tx_exec_async.rs|128 col 9| warning: passing a unit value to a function
--> framework/base/src/types/interaction/tx_exec/tx_exec_async.rs:128:9
|
128 | / self.payment.with_normalized(
129 | | self.env,
130 | | self.from,
131 | | self.to,
... |
140 | | },
141 | | )
| |
^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal ()
|
128 ~ self.from;
129 + self.payment.with_normalized(
130 + self.env,
131 + (),
132 + self.to,
133 + self.data.into(),
134 + |norm_to, norm_egld, norm_fc| {
135 + SendRawWrapper::::new().async_call_raw(
136 + &norm_to,
137 + &norm_egld,
138 + &norm_fc.function_name,
139 + &norm_fc.arg_buffer,
140 + )
141 + },
142 + )
|
framework/base/src/types/interaction/tx_exec/tx_exec_async_promises.rs|155 col 9| warning: passing a unit value to a function
--> framework/base/src/types/interaction/tx_exec/tx_exec_async_promises.rs:155:9
|
155 | / self.payment.with_normalized(
156 | | self.env,
157 | | self.from,
158 | | self.to,
... |
172 | | },
173 | | )
| |
^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal ()
|
155 ~ self.from;
156 + self.payment.with_normalized(
157 + self.env,
158 + (),
159 + self.to,
160 + self.data,
161 + |norm_to, norm_egld, norm_fc| {
162 + SendRawWrapper::::new().create_async_call_raw(
163 + &norm_to,
164 + &norm_egld,
165 + &norm_fc.function_name,
166 + &norm_fc.arg_buffer,
167 + callback_name,
168 + callback_name,
169 + gas,
170 + extra_gas_for_callback,
171 + &cb_closure_args_serialized,
172 + )
173 + },
174 + )
|
framework/base/src/types/interaction/tx_exec/tx_exec_sync.rs|30 col 26| warning: passing a unit value to a function
--> framework/base/src/types/interaction/tx_exec/tx_exec_sync.rs:30:26
|
30 | let raw_result = self.payment.with_normalized(
| ^
31 | | self.env,
32 | | self.from,
33 | | self.to,
... |
43 | | },
44 | | );
| |
^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal ()
|
30 ~ let raw_result = {
31 + self.from;
32 + self.payment.with_normalized(
33 + self.env,
34 + (),
35 + self.to,
36 + self.data.into(),
37 + |norm_to, norm_egld, norm_fc| {
38 + SendRawWrapper::::new().execute_on_dest_context_raw(
39 + gas_limit,
40 + &norm_to,
41 + &norm_egld,
42 + &norm_fc.function_name,
43 + &norm_fc.arg_buffer,
44 + )
45 + },
46 + )
47 ~ };
|
framework/base/src/types/interaction/tx.rs|646 col 9| warning: passing a unit value to a function
--> framework/base/src/types/interaction/tx.rs:646:9
|
646 | / self.payment.with_normalized(
647 | | self.env,
648 | | self.from,
649 | | self.to,
... |
660 | | },
661 | | )
| |
^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
= note: #[warn(clippy::unit_arg)] on by default
help: move the expression in front of the call and replace it with the unit literal ()
|
646 ~ self.from;
647 + self.payment.with_normalized(
648 + self.env,
649 + (),
650 + self.to,
651 + self.data,
652 + |norm_to, norm_egld, norm_fc| ContractCallWithEgld {
653 + basic: ContractCallNoPayment {
654 + phantom: core::marker::PhantomData,
655 + to: norm_to.clone_value(),
656 + function_call: norm_fc.clone(),
657 + explicit_gas_limit: UNSPECIFIED_GAS_LIMIT,
658 + return_type: core::marker::PhantomData,
659 + },
660 + egld_payment: norm_egld.clone_value(),
661 + },
662 + )
|
framework/base/src/types/interaction/tx_exec/tx_exec_async.rs|128 col 9| warning: passing a unit value to a function
--> framework/base/src/types/interaction/tx_exec/tx_exec_async.rs:128:9
|
128 | / self.payment.with_normalized(
129 | | self.env,
130 | | self.from,
131 | | self.to,
... |
140 | | },
141 | | )
| |
^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal ()
|
128 ~ self.from;
129 + self.payment.with_normalized(
130 + self.env,
131 + (),
132 + self.to,
133 + self.data.into(),
134 + |norm_to, norm_egld, norm_fc| {
135 + SendRawWrapper::::new().async_call_raw(
136 + &norm_to,
137 + &norm_egld,
138 + &norm_fc.function_name,
139 + &norm_fc.arg_buffer,
140 + )
141 + },
142 + )
|
framework/base/src/types/interaction/tx_exec/tx_exec_async_promises.rs|155 col 9| warning: passing a unit value to a function
--> framework/base/src/types/interaction/tx_exec/tx_exec_async_promises.rs:155:9
|
155 | / self.payment.with_normalized(
156 | | self.env,
157 | | self.from,
158 | | self.to,
... |
172 | | },
173 | | )
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal ()
|
155 ~ self.from;
156 + self.payment.with_normalized(
157 + self.env,
158 + (),
159 + self.to,
160 + self.data,
161 + |norm_to, norm_egld, norm_fc| {
162 + SendRawWrapper::::new().create_async_call_raw(
163 + &norm_to,
164 + &norm_egld,
165 + &norm_fc.function_name,
166 + &norm_fc.arg_buffer,
167 + callback_name,
168 + callback_name,
169 + gas,
170 + extra_gas_for_callback,
171 + &cb_closure_args_serialized,
172 + )
173 + },
174 + )
|
framework/base/src/types/interaction/tx_exec/tx_exec_sync.rs|30 col 26| warning: passing a unit value to a function
--> framework/base/src/types/interaction/tx_exec/tx_exec_sync.rs:30:26
|
30 | let raw_result = self.payment.with_normalized(
| _________________^
31 | | self.env,
32 | | self.from,
33 | | self.to,
... |
43 | | },
44 | | );
| |
^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal ()
|
30 ~ let raw_result = {
31 + self.from;
32 + self.payment.with_normalized(
33 + self.env,
34 + (),
35 + self.to,
36 + self.data.into(),
37 + |norm_to, norm_egld, norm_fc| {
38 + SendRawWrapper::::new().execute_on_dest_context_raw(
39 + gas_limit,
40 + &norm_to,
41 + &norm_egld,
42 + &norm_fc.function_name,
43 + &norm_fc.arg_buffer,
44 + )
45 + },
46 + )
47 ~ };
|