Logarithm & ManagedDecimal cleanup #1915
reviewdog [clippy] report
reported by reviewdog 🐶
Findings (2)
framework/scenario/tests/managed_decimal_test.rs|155 col 29| error[E0061]: this method takes 0 arguments but 1 argument was supplied
--> framework/scenario/tests/managed_decimal_test.rs:155:26
|
155 | let ln_fixed = fixed.ln(ConstDecimals::<10>); // precision of 10 decimal points
| ^^ -------------------
| |
| unexpected argument of type multiversx_sc::types::ConstDecimals<10>
| help: remove the extra argument
|
note: method defined here
--> /home/runner/work/mx-sdk-rs/mx-sdk-rs/framework/base/src/types/managed/wrapped/managed_decimal.rs:116:12
|
116 | pub fn ln(&self) -> Option {
| ^^
framework/scenario/tests/managed_decimal_test.rs|160 col 9| error[E0308]: mismatched types
--> framework/scenario/tests/managed_decimal_test.rs:160:9
|
160 | / ManagedDecimal::<StaticApi, ConstDecimals<10>>::const_decimals_from_raw(BigUint::from(
161 | | 31355146488u64
162 | | ),)
| |___________^ expected Option<i64>
, found ManagedDecimal<VMHooksApi<...>, ...>
|
= note: expected enum std::option::Option<i64>
found struct ManagedDecimal<VMHooksApi<StaticApiBackend>, ConstDecimals<10>>
= note: the full type name has been written to '/home/runner/work/mx-sdk-rs/mx-sdk-rs/target/debug/deps/managed_decimal_test-c8b51d5b9a7b9d34.long-type-1926160300941319864.txt'
= note: consider using --verbose
to print the full type name to the console
Filtered Findings (0)
Annotations
Check failure on line 155 in framework/scenario/tests/managed_decimal_test.rs
github-actions / clippy
[clippy] framework/scenario/tests/managed_decimal_test.rs#L155
error[E0061]: this method takes 0 arguments but 1 argument was supplied
--> framework/scenario/tests/managed_decimal_test.rs:155:26
|
155 | let ln_fixed = fixed.ln(ConstDecimals::<10>); // precision of 10 decimal points
| ^^ -------------------
| |
| unexpected argument of type `multiversx_sc::types::ConstDecimals<10>`
| help: remove the extra argument
|
note: method defined here
--> /home/runner/work/mx-sdk-rs/mx-sdk-rs/framework/base/src/types/managed/wrapped/managed_decimal.rs:116:12
|
116 | pub fn ln(&self) -> Option<i64> {
| ^^
Raw output
framework/scenario/tests/managed_decimal_test.rs:155:29:e:error[E0061]: this method takes 0 arguments but 1 argument was supplied
--> framework/scenario/tests/managed_decimal_test.rs:155:26
|
155 | let ln_fixed = fixed.ln(ConstDecimals::<10>); // precision of 10 decimal points
| ^^ -------------------
| |
| unexpected argument of type `multiversx_sc::types::ConstDecimals<10>`
| help: remove the extra argument
|
note: method defined here
--> /home/runner/work/mx-sdk-rs/mx-sdk-rs/framework/base/src/types/managed/wrapped/managed_decimal.rs:116:12
|
116 | pub fn ln(&self) -> Option<i64> {
| ^^
__END__
Check failure on line 160 in framework/scenario/tests/managed_decimal_test.rs
github-actions / clippy
[clippy] framework/scenario/tests/managed_decimal_test.rs#L160
error[E0308]: mismatched types
--> framework/scenario/tests/managed_decimal_test.rs:160:9
|
160 | / ManagedDecimal::<StaticApi, ConstDecimals<10>>::const_decimals_from_raw(BigUint::from(
161 | | 31355146488u64
162 | | ),)
| |___________^ expected `Option<i64>`, found `ManagedDecimal<VMHooksApi<...>, ...>`
|
= note: expected enum `std::option::Option<i64>`
found struct `ManagedDecimal<VMHooksApi<StaticApiBackend>, ConstDecimals<10>>`
= note: the full type name has been written to '/home/runner/work/mx-sdk-rs/mx-sdk-rs/target/debug/deps/managed_decimal_test-c8b51d5b9a7b9d34.long-type-1926160300941319864.txt'
= note: consider using `--verbose` to print the full type name to the console
Raw output
framework/scenario/tests/managed_decimal_test.rs:160:9:e:error[E0308]: mismatched types
--> framework/scenario/tests/managed_decimal_test.rs:160:9
|
160 | / ManagedDecimal::<StaticApi, ConstDecimals<10>>::const_decimals_from_raw(BigUint::from(
161 | | 31355146488u64
162 | | ),)
| |___________^ expected `Option<i64>`, found `ManagedDecimal<VMHooksApi<...>, ...>`
|
= note: expected enum `std::option::Option<i64>`
found struct `ManagedDecimal<VMHooksApi<StaticApiBackend>, ConstDecimals<10>>`
= note: the full type name has been written to '/home/runner/work/mx-sdk-rs/mx-sdk-rs/target/debug/deps/managed_decimal_test-c8b51d5b9a7b9d34.long-type-1926160300941319864.txt'
= note: consider using `--verbose` to print the full type name to the console
__END__