Skip to content

feat: Add Stylus Constructors #1252

feat: Add Stylus Constructors

feat: Add Stylus Constructors #1252

GitHub Actions / clippy failed Feb 10, 2025 in 0s

reviewdog [clippy] report

reported by reviewdog 🐶

Findings (5)

contracts/src/access/ownable.rs|169 col 5| warning: docs for function returning Result missing # Errors section
--> contracts/src/access/ownable.rs:169:5
|
169 | pub fn constructor(&mut self, initial_owner: Address) -> Result<(), Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
= note: -W clippy::missing-errors-doc implied by -W clippy::pedantic
= help: to override -W clippy::pedantic add #[allow(clippy::missing_errors_doc)]
contracts/src/access/ownable.rs|171 col 24| warning: useless conversion to the same type: access::ownable::Error
--> contracts/src/access/ownable.rs:171:24
|
171 | return Err(Error::InvalidOwner(OwnableInvalidOwner {
| ^
172 | | owner: Address::ZERO,
173 | | })
174 | | .into());
| |
^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: -W clippy::useless-conversion implied by -W clippy::all
= help: to override -W clippy::all add #[allow(clippy::useless_conversion)]
help: consider removing .into()
|
171 ~ return Err(Error::InvalidOwner(OwnableInvalidOwner {
172 + owner: Address::ZERO,
173 ~ }));
|
contracts/src/access/ownable_two_step.rs|210 col 5| warning: docs for function returning Result missing # Errors section
--> contracts/src/access/ownable_two_step.rs:210:5
|
210 | pub fn constructor(&mut self, initial_owner: Address) -> Result<(), Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
contracts/src/finance/vesting_wallet.rs|481 col 5| warning: docs for function returning Result missing # Errors section
--> contracts/src/finance/vesting_wallet.rs:481:5
|
481 | / pub fn constructor(
482 | | &mut self,
483 | | beneficiary: Address,
484 | | start_timestamp: U64,
485 | | duration_seconds: U64,
486 | | ) -> Result<(), Error> {
| |
_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
contracts/src/token/erc20/extensions/capped.rs|60 col 5| warning: docs for function returning Result missing # Errors section
--> contracts/src/token/erc20/extensions/capped.rs:60:5
|
60 | pub fn constructor(&mut self, cap: U256) -> Result<(), Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

Filtered Findings (0)

Annotations

Check warning on line 169 in contracts/src/access/ownable.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] contracts/src/access/ownable.rs#L169

warning: docs for function returning `Result` missing `# Errors` section
   --> contracts/src/access/ownable.rs:169:5
    |
169 |     pub fn constructor(&mut self, initial_owner: Address) -> Result<(), Error> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
    = note: `-W clippy::missing-errors-doc` implied by `-W clippy::pedantic`
    = help: to override `-W clippy::pedantic` add `#[allow(clippy::missing_errors_doc)]`
Raw output
contracts/src/access/ownable.rs:169:5:w:warning: docs for function returning `Result` missing `# Errors` section
   --> contracts/src/access/ownable.rs:169:5
    |
169 |     pub fn constructor(&mut self, initial_owner: Address) -> Result<(), Error> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
    = note: `-W clippy::missing-errors-doc` implied by `-W clippy::pedantic`
    = help: to override `-W clippy::pedantic` add `#[allow(clippy::missing_errors_doc)]`


__END__

Check warning on line 171 in contracts/src/access/ownable.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] contracts/src/access/ownable.rs#L171

warning: useless conversion to the same type: `access::ownable::Error`
   --> contracts/src/access/ownable.rs:171:24
    |
171 |               return Err(Error::InvalidOwner(OwnableInvalidOwner {
    |  ________________________^
172 | |                 owner: Address::ZERO,
173 | |             })
174 | |             .into());
    | |___________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
    = note: `-W clippy::useless-conversion` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::useless_conversion)]`
help: consider removing `.into()`
    |
171 ~             return Err(Error::InvalidOwner(OwnableInvalidOwner {
172 +                 owner: Address::ZERO,
173 ~             }));
    |
Raw output
contracts/src/access/ownable.rs:171:24:w:warning: useless conversion to the same type: `access::ownable::Error`
   --> contracts/src/access/ownable.rs:171:24
    |
171 |               return Err(Error::InvalidOwner(OwnableInvalidOwner {
    |  ________________________^
172 | |                 owner: Address::ZERO,
173 | |             })
174 | |             .into());
    | |___________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
    = note: `-W clippy::useless-conversion` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::useless_conversion)]`
help: consider removing `.into()`
    |
171 ~             return Err(Error::InvalidOwner(OwnableInvalidOwner {
172 +                 owner: Address::ZERO,
173 ~             }));
    |


__END__

Check warning on line 210 in contracts/src/access/ownable_two_step.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] contracts/src/access/ownable_two_step.rs#L210

warning: docs for function returning `Result` missing `# Errors` section
   --> contracts/src/access/ownable_two_step.rs:210:5
    |
210 |     pub fn constructor(&mut self, initial_owner: Address) -> Result<(), Error> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Raw output
contracts/src/access/ownable_two_step.rs:210:5:w:warning: docs for function returning `Result` missing `# Errors` section
   --> contracts/src/access/ownable_two_step.rs:210:5
    |
210 |     pub fn constructor(&mut self, initial_owner: Address) -> Result<(), Error> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc


__END__

Check warning on line 481 in contracts/src/finance/vesting_wallet.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] contracts/src/finance/vesting_wallet.rs#L481

warning: docs for function returning `Result` missing `# Errors` section
   --> contracts/src/finance/vesting_wallet.rs:481:5
    |
481 | /     pub fn constructor(
482 | |         &mut self,
483 | |         beneficiary: Address,
484 | |         start_timestamp: U64,
485 | |         duration_seconds: U64,
486 | |     ) -> Result<(), Error> {
    | |__________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Raw output
contracts/src/finance/vesting_wallet.rs:481:5:w:warning: docs for function returning `Result` missing `# Errors` section
   --> contracts/src/finance/vesting_wallet.rs:481:5
    |
481 | /     pub fn constructor(
482 | |         &mut self,
483 | |         beneficiary: Address,
484 | |         start_timestamp: U64,
485 | |         duration_seconds: U64,
486 | |     ) -> Result<(), Error> {
    | |__________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc


__END__

Check warning on line 60 in contracts/src/token/erc20/extensions/capped.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] contracts/src/token/erc20/extensions/capped.rs#L60

warning: docs for function returning `Result` missing `# Errors` section
  --> contracts/src/token/erc20/extensions/capped.rs:60:5
   |
60 |     pub fn constructor(&mut self, cap: U256) -> Result<(), Error> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
Raw output
contracts/src/token/erc20/extensions/capped.rs:60:5:w:warning: docs for function returning `Result` missing `# Errors` section
  --> contracts/src/token/erc20/extensions/capped.rs:60:5
   |
60 |     pub fn constructor(&mut self, cap: U256) -> Result<(), Error> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc


__END__