You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Checking web3 v0.19.0
error[E0308]: `match` arms have incompatible types
--> /Users/ababo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/web3-0.19.0/src/api/accounts.rs:79:37
|
77 | / match $o {
78 | | Some(value) => Ok(value),
| | --------- this is found to be of type `std::result::Result<U256, _>`
79 | | None => $f.await,
| | ^^^^^^^^ expected `Result<U256, _>`, found `U256`
80 | | }
| |_________________________- `match` arms have incompatible types
...
95 | maybe!(gas_price, self.web3().eth().gas_price()),
| ------------------------------------------------ in this macro invocation
|
= note: expected enum `std::result::Result<U256, _>`
found struct `U256`
= note: this error originates in the macro `maybe` (in Nightly builds, run with -Z macro-backtrace for more info)
help: try wrapping the expression in a variant of `std::result::Result`
|
79 | None => Ok($f.await),
| +++ +
79 | None => Err($f.await),
| ++++ +
error[E0277]: the `?` operator can only be used in an async function that returns `Result` or `Option` (or another type that implements `FromResidual`)
--> /Users/ababo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/web3-0.19.0/src/api/eth.rs:91:90
|
90 | pub async fn gas_price(&self) -> U256 {
| ___________________________________________-
91 | | let price = CallFuture::new(self.transport.execute("eth_gasPrice", vec![])).await?;
| | ^ cannot use the `?` operator in an async function that returns `U256`
92 | | info!("price {}", price.to_string());
93 | | Ok(price)
94 | | }
| |_____- this function should return `Result` or `Option` to accept `?`
|
= help: the trait `FromResidual<std::result::Result<Infallible, error::Error>>` is not implemented for `U256`
Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `web3` (lib) due to 2 previous errors
The text was updated successfully, but these errors were encountered:
Here is the output I got:
The text was updated successfully, but these errors were encountered: