reviewdog [clippy] report
reported by reviewdog 🐶
Findings (1)
contracts/feature-tests/big-float-features/src/big_float_operators.rs|90 col 9| error[E0308]: mismatched types
--> contracts/feature-tests/big-float-features/src/big_float_operators.rs:90:9
|
89 | fn ln_big_float_ref(&self, a: &BigFloat) -> BigFloat {
| -------- expected multiversx_sc::types::BigFloat<<Self as multiversx_sc::contract_base::ContractBase>::Api>
because of return type
90 | a.ln()
| ^^^^^^ expected BigFloat<<... as ContractBase>::Api>
, found Option<BigFloat<...>>
|
= note: expected struct multiversx_sc::types::BigFloat<_>
found enum core::option::Option<multiversx_sc::types::BigFloat<_>>
help: consider using Option::expect
to unwrap the core::option::Option<multiversx_sc::types::BigFloat<<Self as multiversx_sc::contract_base::ContractBase>::Api>>
value, panicking if the value is an Option::None
|
90 | a.ln().expect("REASON")
| +++++++++++++++++
Filtered Findings (0)
Annotations
Check failure on line 90 in contracts/feature-tests/big-float-features/src/big_float_operators.rs
github-actions / clippy
[clippy] contracts/feature-tests/big-float-features/src/big_float_operators.rs#L90
error[E0308]: mismatched types
--> contracts/feature-tests/big-float-features/src/big_float_operators.rs:90:9
|
89 | fn ln_big_float_ref(&self, a: &BigFloat) -> BigFloat {
| -------- expected `multiversx_sc::types::BigFloat<<Self as multiversx_sc::contract_base::ContractBase>::Api>` because of return type
90 | a.ln()
| ^^^^^^ expected `BigFloat<<... as ContractBase>::Api>`, found `Option<BigFloat<...>>`
|
= note: expected struct `multiversx_sc::types::BigFloat<_>`
found enum `core::option::Option<multiversx_sc::types::BigFloat<_>>`
help: consider using `Option::expect` to unwrap the `core::option::Option<multiversx_sc::types::BigFloat<<Self as multiversx_sc::contract_base::ContractBase>::Api>>` value, panicking if the value is an `Option::None`
|
90 | a.ln().expect("REASON")
| +++++++++++++++++
Raw output
contracts/feature-tests/big-float-features/src/big_float_operators.rs:90:9:e:error[E0308]: mismatched types
--> contracts/feature-tests/big-float-features/src/big_float_operators.rs:90:9
|
89 | fn ln_big_float_ref(&self, a: &BigFloat) -> BigFloat {
| -------- expected `multiversx_sc::types::BigFloat<<Self as multiversx_sc::contract_base::ContractBase>::Api>` because of return type
90 | a.ln()
| ^^^^^^ expected `BigFloat<<... as ContractBase>::Api>`, found `Option<BigFloat<...>>`
|
= note: expected struct `multiversx_sc::types::BigFloat<_>`
found enum `core::option::Option<multiversx_sc::types::BigFloat<_>>`
help: consider using `Option::expect` to unwrap the `core::option::Option<multiversx_sc::types::BigFloat<<Self as multiversx_sc::contract_base::ContractBase>::Api>>` value, panicking if the value is an `Option::None`
|
90 | a.ln().expect("REASON")
| +++++++++++++++++
__END__