Lottery SC audit fixes #4208
reviewdog [clippy] report
reported by reviewdog 🐶
Findings (8)
contracts/examples/lottery-esdt/src/lottery.rs|184 col 39| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:184:39
|
184 | if self.total_winning_tickets(&lottery_name).is_empty() {
| ^^^^^^^^^^^^^ 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
contracts/examples/lottery-esdt/src/lottery.rs|185 col 35| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:185:35
|
185 | self.prepare_awarding(&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
contracts/examples/lottery-esdt/src/lottery.rs|187 col 32| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:187:32
|
187 | self.distribute_prizes(&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
contracts/examples/lottery-esdt/src/lottery.rs|322 col 32| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:322:32
|
322 | self.clear_storage(&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
contracts/examples/lottery-esdt/src/lottery.rs|184 col 39| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:184:39
|
184 | if self.total_winning_tickets(&lottery_name).is_empty() {
| ^^^^^^^^^^^^^ 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
contracts/examples/lottery-esdt/src/lottery.rs|185 col 35| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:185:35
|
185 | self.prepare_awarding(&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
contracts/examples/lottery-esdt/src/lottery.rs|187 col 32| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:187:32
|
187 | self.distribute_prizes(&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
contracts/examples/lottery-esdt/src/lottery.rs|322 col 32| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:322:32
|
322 | self.clear_storage(&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
Filtered Findings (0)
Annotations
Check warning on line 184 in contracts/examples/lottery-esdt/src/lottery.rs
github-actions / clippy
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L184
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:184:39
|
184 | if self.total_winning_tickets(&lottery_name).is_empty() {
| ^^^^^^^^^^^^^ 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
Raw output
contracts/examples/lottery-esdt/src/lottery.rs:184:39:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:184:39
|
184 | if self.total_winning_tickets(&lottery_name).is_empty() {
| ^^^^^^^^^^^^^ 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
__END__
Check warning on line 185 in contracts/examples/lottery-esdt/src/lottery.rs
github-actions / clippy
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L185
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:185:35
|
185 | self.prepare_awarding(&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
Raw output
contracts/examples/lottery-esdt/src/lottery.rs:185:35:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:185:35
|
185 | self.prepare_awarding(&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
__END__
Check warning on line 187 in contracts/examples/lottery-esdt/src/lottery.rs
github-actions / clippy
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L187
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:187:32
|
187 | self.distribute_prizes(&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
Raw output
contracts/examples/lottery-esdt/src/lottery.rs:187:32:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:187:32
|
187 | self.distribute_prizes(&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
__END__
Check warning on line 322 in contracts/examples/lottery-esdt/src/lottery.rs
github-actions / clippy
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L322
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:322:32
|
322 | self.clear_storage(&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
Raw output
contracts/examples/lottery-esdt/src/lottery.rs:322:32:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:322:32
|
322 | self.clear_storage(&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
__END__
Check warning on line 184 in contracts/examples/lottery-esdt/src/lottery.rs
github-actions / clippy
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L184
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:184:39
|
184 | if self.total_winning_tickets(&lottery_name).is_empty() {
| ^^^^^^^^^^^^^ 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
Raw output
contracts/examples/lottery-esdt/src/lottery.rs:184:39:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:184:39
|
184 | if self.total_winning_tickets(&lottery_name).is_empty() {
| ^^^^^^^^^^^^^ 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
__END__
Check warning on line 185 in contracts/examples/lottery-esdt/src/lottery.rs
github-actions / clippy
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L185
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:185:35
|
185 | self.prepare_awarding(&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
Raw output
contracts/examples/lottery-esdt/src/lottery.rs:185:35:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:185:35
|
185 | self.prepare_awarding(&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
__END__
Check warning on line 187 in contracts/examples/lottery-esdt/src/lottery.rs
github-actions / clippy
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L187
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:187:32
|
187 | self.distribute_prizes(&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
Raw output
contracts/examples/lottery-esdt/src/lottery.rs:187:32:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:187:32
|
187 | self.distribute_prizes(&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
__END__
Check warning on line 322 in contracts/examples/lottery-esdt/src/lottery.rs
github-actions / clippy
[clippy] contracts/examples/lottery-esdt/src/lottery.rs#L322
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:322:32
|
322 | self.clear_storage(&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
Raw output
contracts/examples/lottery-esdt/src/lottery.rs:322:32:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/examples/lottery-esdt/src/lottery.rs:322:32
|
322 | self.clear_storage(&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
__END__