-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
Currently when generating contract from abi for an event with no output values (like this one)
The resulting contract looks like this
) -> Result<Self, self::ethcontract::tokens::Error> {
let () = self::ethcontract::tokens::Tokenize::from_token(token)?;
Ok(FactoryDisabled())
}Which causes the following error/warning:
Compiling contracts v0.1.0 (/Users/bensniff/Projects/cowprotocol/services/crates/contracts)
error: this let-binding has unit value
--> /Users/bensniff/Projects/cowprotocol/services/target/debug/build/contracts-85b524e76e657330/out/BalancerV2StablePoolFactoryV2.rs:432:17
|
432 | let () = self::ethcontract::tokens::Tokenize::from_token(token)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self::ethcontract::tokens::Tokenize::from_token(token)?;`
|
= note: `-D clippy::let-unit-value` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
We could probably work around this with a clippy-ignore statement of some kind, but may also want to address this case head on.
I suspect there is some part of this file that will need to be updated
For more context: see cowprotocol/services#371
Metadata
Metadata
Assignees
Labels
No labels