Skip to content

ref(erc20): ERC20Burnable as a macro #118

ref(erc20): ERC20Burnable as a macro

ref(erc20): ERC20Burnable as a macro #118

Triggered via pull request April 9, 2024 15:46
Status Success
Total duration 49s
Billable time 1m
Artifacts

nostd.yml

on: pull_request
Matrix: nostd
Fit to window
Zoom out
Zoom in

Annotations

8 warnings
[clippy] contracts/src/erc20/extensions/burnable.rs#L5: contracts/src/erc20/extensions/burnable.rs#L5
warning: item name ends with its containing module's name --> contracts/src/erc20/extensions/burnable.rs:5:14 | 5 | macro_rules! derive_erc20_burnable { | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions = note: `#[warn(clippy::module_name_repetitions)]` implied by `#[warn(clippy::pedantic)]`
[clippy] contracts/src/erc20/extensions/burnable.rs#L5: contracts/src/erc20/extensions/burnable.rs#L5
warning: item name ends with its containing module's name --> contracts/src/erc20/extensions/burnable.rs:5:14 | 5 | macro_rules! derive_erc20_burnable { | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions = note: `#[warn(clippy::module_name_repetitions)]` implied by `#[warn(clippy::pedantic)]`
[clippy] contracts/src/erc20/mod.rs#L341: contracts/src/erc20/mod.rs#L341
warning: redundant else block --> contracts/src/erc20/mod.rs:341:20 | 341 | } else { | ____________________^ 342 | | // Overflow not possible: 343 | | // value <= from_balance <= _total_supply. 344 | | self._balances.setter(from).set(from_balance - value); 345 | | } | |_____________^ | = help: remove the `else` block and move the contents out = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_else note: the lint level is defined here --> contracts/src/lib.rs:3:22 | 3 | #![warn(clippy::all, clippy::pedantic)] | ^^^^^^^^^^^^^^^^ = note: `#[warn(clippy::redundant_else)]` implied by `#[warn(clippy::pedantic)]`
[clippy] contracts/src/erc20/extensions/burnable.rs#L5: contracts/src/erc20/extensions/burnable.rs#L5
warning: item name ends with its containing module's name --> contracts/src/erc20/extensions/burnable.rs:5:14 | 5 | macro_rules! derive_erc20_burnable { | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions = note: `#[warn(clippy::module_name_repetitions)]` implied by `#[warn(clippy::pedantic)]`
[clippy] contracts/src/erc20/mod.rs#L317: contracts/src/erc20/mod.rs#L317
warning: docs for function which may panic missing `# Panics` section --> contracts/src/erc20/mod.rs:317:5 | 317 | / pub fn _update( 318 | | &mut self, 319 | | from: Address, 320 | | to: Address, 321 | | value: U256, 322 | | ) -> Result<(), Error> { | |__________________________^ | note: first possible panic found here --> contracts/src/erc20/mod.rs:326:32 | 326 | let total_supply = self | ________________________________^ 327 | | .total_supply() 328 | | .checked_add(value) 329 | | .expect("Should not exceed `U256::MAX` for `_total_supply`"); | |____________________________________________________________________________^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc = note: `#[warn(clippy::missing_panics_doc)]` implied by `#[warn(clippy::pedantic)]`
[clippy] contracts/src/erc20/mod.rs#L341: contracts/src/erc20/mod.rs#L341
warning: redundant else block --> contracts/src/erc20/mod.rs:341:20 | 341 | } else { | ____________________^ 342 | | // Overflow not possible: 343 | | // value <= from_balance <= _total_supply. 344 | | self._balances.setter(from).set(from_balance - value); 345 | | } | |_____________^ | = help: remove the `else` block and move the contents out = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_else note: the lint level is defined here --> contracts/src/lib.rs:3:22 | 3 | #![warn(clippy::all, clippy::pedantic)] | ^^^^^^^^^^^^^^^^ = note: `#[warn(clippy::redundant_else)]` implied by `#[warn(clippy::pedantic)]`
[clippy] contracts/src/erc20/extensions/burnable.rs#L5: contracts/src/erc20/extensions/burnable.rs#L5
warning: item name ends with its containing module's name --> contracts/src/erc20/extensions/burnable.rs:5:14 | 5 | macro_rules! derive_erc20_burnable { | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions = note: `#[warn(clippy::module_name_repetitions)]` implied by `#[warn(clippy::pedantic)]`
[clippy] contracts/src/erc20/mod.rs#L317: contracts/src/erc20/mod.rs#L317
warning: docs for function which may panic missing `# Panics` section --> contracts/src/erc20/mod.rs:317:5 | 317 | / pub fn _update( 318 | | &mut self, 319 | | from: Address, 320 | | to: Address, 321 | | value: U256, 322 | | ) -> Result<(), Error> { | |__________________________^ | note: first possible panic found here --> contracts/src/erc20/mod.rs:326:32 | 326 | let total_supply = self | ________________________________^ 327 | | .total_supply() 328 | | .checked_add(value) 329 | | .expect("Should not exceed `U256::MAX` for `_total_supply`"); | |____________________________________________________________________________^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc = note: `#[warn(clippy::missing_panics_doc)]` implied by `#[warn(clippy::pedantic)]`