Lottery SC audit fixes #2216
Triggered via pull request
September 4, 2024 08:29
Status
Success
Total duration
10m 35s
Artifacts
–
template-test-current.yml
on: pull_request
Template tool test - current (unreleased) templates
10m 26s
Annotations
19 warnings
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L269:
contracts/examples/lottery-esdt/src/lottery.rs#L269
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:269:36
|
269 | self.total_winning_tickets(&lottery_name)
| ^^^^^^^^^^^^^ help: change this to: `lottery_name`
|
= 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
|
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L279:
contracts/examples/lottery-esdt/src/lottery.rs#L279
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:279:60
|
279 | let mut index_last_winner = self.index_last_winner(&lottery_name).get();
| ^^^^^^^^^^^^^ help: change this to: `lottery_name`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L325:
contracts/examples/lottery-esdt/src/lottery.rs#L325
warning: the borrowed expression implements the required traits
--> contracts/examples/lottery-esdt/src/lottery.rs:325:50
|
325 | self.index_last_winner(lottery_name).set(&index_last_winner);
| ^^^^^^^^^^^^^^^^^^ help: change this to: `index_last_winner`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L412:
contracts/examples/lottery-esdt/src/lottery.rs#L412
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:412:57
|
412 | let value = self.accumulated_rewards(&token_id, &caller).take();
| ^^^^^^^ help: change this to: `caller`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L269:
contracts/examples/lottery-esdt/src/lottery.rs#L269
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:269:36
|
269 | self.total_winning_tickets(&lottery_name)
| ^^^^^^^^^^^^^ help: change this to: `lottery_name`
|
= 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
|
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L279:
contracts/examples/lottery-esdt/src/lottery.rs#L279
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:279:60
|
279 | let mut index_last_winner = self.index_last_winner(&lottery_name).get();
| ^^^^^^^^^^^^^ help: change this to: `lottery_name`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L325:
contracts/examples/lottery-esdt/src/lottery.rs#L325
warning: the borrowed expression implements the required traits
--> contracts/examples/lottery-esdt/src/lottery.rs:325:50
|
325 | self.index_last_winner(lottery_name).set(&index_last_winner);
| ^^^^^^^^^^^^^^^^^^ help: change this to: `index_last_winner`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L412:
contracts/examples/lottery-esdt/src/lottery.rs#L412
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:412:57
|
412 | let value = self.accumulated_rewards(&token_id, &caller).take();
| ^^^^^^^ help: change this to: `caller`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L269:
contracts/examples/lottery-esdt/src/lottery.rs#L269
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:269:36
|
269 | self.total_winning_tickets(&lottery_name)
| ^^^^^^^^^^^^^ help: change this to: `lottery_name`
|
= 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
|
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L279:
contracts/examples/lottery-esdt/src/lottery.rs#L279
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:279:60
|
279 | let mut index_last_winner = self.index_last_winner(&lottery_name).get();
| ^^^^^^^^^^^^^ help: change this to: `lottery_name`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L325:
contracts/examples/lottery-esdt/src/lottery.rs#L325
warning: the borrowed expression implements the required traits
--> contracts/examples/lottery-esdt/src/lottery.rs:325:50
|
325 | self.index_last_winner(lottery_name).set(&index_last_winner);
| ^^^^^^^^^^^^^^^^^^ help: change this to: `index_last_winner`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L412:
contracts/examples/lottery-esdt/src/lottery.rs#L412
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:412:57
|
412 | let value = self.accumulated_rewards(&token_id, &caller).take();
| ^^^^^^^ help: change this to: `caller`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L269:
contracts/examples/lottery-esdt/src/lottery.rs#L269
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:269:36
|
269 | self.total_winning_tickets(&lottery_name)
| ^^^^^^^^^^^^^ help: change this to: `lottery_name`
|
= 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
|
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L279:
contracts/examples/lottery-esdt/src/lottery.rs#L279
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:279:60
|
279 | let mut index_last_winner = self.index_last_winner(&lottery_name).get();
| ^^^^^^^^^^^^^ help: change this to: `lottery_name`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L325:
contracts/examples/lottery-esdt/src/lottery.rs#L325
warning: the borrowed expression implements the required traits
--> contracts/examples/lottery-esdt/src/lottery.rs:325:50
|
325 | self.index_last_winner(lottery_name).set(&index_last_winner);
| ^^^^^^^^^^^^^^^^^^ help: change this to: `index_last_winner`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L412:
contracts/examples/lottery-esdt/src/lottery.rs#L412
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:412:57
|
412 | let value = self.accumulated_rewards(&token_id, &caller).take();
| ^^^^^^^ help: change this to: `caller`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
Template tool test - current (unreleased) templates
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
Template tool test - current (unreleased) templates
Unexpected input(s) 'default', valid inputs are ['toolchain', 'target', 'components', 'cache', 'cache-workspaces', 'cache-on-failure', 'matcher', 'rustflags']
|
Template tool test - current (unreleased) templates
Unexpected input(s) 'default', valid inputs are ['toolchain', 'target', 'components', 'cache', 'cache-workspaces', 'cache-on-failure', 'matcher', 'rustflags']
|