chore(clippy): minor code refactors to satisfy Clippy #92
clippy
40 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 40 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.78.0 (9b00956e5 2024-04-29)
- cargo 1.78.0 (54d8815d0 2024-03-26)
- clippy 0.1.78 (9b00956 2024-04-29)
Annotations
Check failure on line 223 in data_structures/src/staking/stakes.rs
github-actions / clippy
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
--> data_structures/src/staking/stakes.rs:223:14
|
223 | .into_iter()
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
= note: `-D clippy::into-iter-on-ref` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::into_iter_on_ref)]`
Check failure on line 83 in data_structures/src/staking/stake.rs
github-actions / clippy
casting `u64` to `u32` may truncate the value
error: casting `u64` to `u32` may truncate the value
--> data_structures/src/staking/stake.rs:83:13
|
83 | (u64::from(product_before + product_added) / u64::from(coins_after)) as u32,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ...
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation
= note: requested on the command line with `-D clippy::cast-possible-truncation`
help: ... or use `try_from` and handle the error accordingly
|
83 | u32::try_from(u64::from(product_before + product_added) / u64::from(coins_after)),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Check failure on line 1645 in data_structures/src/chain/mod.rs
github-actions / clippy
casting `u8` to `i32` may become silently lossy if you later change the type
error: casting `u8` to `i32` may become silently lossy if you later change the type
--> data_structures/src/chain/mod.rs:1645:42
|
1645 | let recid = RecoveryId::from_i32(compact[0] as i32)
| ^^^^^^^^^^^^^^^^^ help: try: `i32::from(compact[0])`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
= note: requested on the command line with `-D clippy::cast-lossless`
Check failure on line 749 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:749:32
|
749 | stakes.query_power(charlie_erin, Capability::Witnessing, 300),
| ----------- ^^^^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`
Check failure on line 745 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:745:32
|
745 | stakes.query_power(bob_david, Capability::Witnessing, 300),
| ----------- ^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`
Check failure on line 741 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:741:32
|
741 | stakes.query_power(alice_charlie, Capability::Witnessing, 300),
| ----------- ^^^^^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`
Check failure on line 737 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:737:32
|
737 | stakes.query_power(charlie_erin, Capability::Mining, 300),
| ----------- ^^^^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`
Check failure on line 733 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:733:32
|
733 | stakes.query_power(bob_david, Capability::Mining, 300),
| ----------- ^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`
Check failure on line 729 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:729:32
|
729 | stakes.query_power(alice_charlie, Capability::Mining, 300),
| ----------- ^^^^^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`
Check failure on line 707 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:707:32
|
707 | stakes.query_power(charlie_erin, Capability::Witnessing, 101),
| ----------- ^^^^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`
Check failure on line 703 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:703:32
|
703 | stakes.query_power(bob_david, Capability::Witnessing, 101),
| ----------- ^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`
Check failure on line 699 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:699:32
|
699 | stakes.query_power(alice_charlie, Capability::Witnessing, 101),
| ----------- ^^^^^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`
Check failure on line 695 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:695:32
|
695 | stakes.query_power(charlie_erin, Capability::Mining, 101),
| ----------- ^^^^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`
Check failure on line 691 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:691:32
|
691 | stakes.query_power(bob_david, Capability::Mining, 101),
| ----------- ^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`
Check failure on line 687 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:687:32
|
687 | stakes.query_power(alice_charlie, Capability::Mining, 101),
| ----------- ^^^^^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`
Check failure on line 684 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:684:24
|
684 | .reset_age(charlie_erin, Capability::Mining, 101)
| --------- ^^^^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::reset_age`
--> data_structures/src/staking/stakes.rs:300:14
|
293 | pub fn reset_age<ISK>(
| --------- required by a bound in this associated function
...
300 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::reset_age`
Check failure on line 662 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:662:32
|
662 | stakes.query_power(charlie_erin, Capability::Witnessing, 100),
| ----------- ^^^^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`
Check failure on line 658 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:658:32
|
658 | stakes.query_power(bob_david, Capability::Witnessing, 100),
| ----------- ^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`
Check failure on line 654 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:654:32
|
654 | stakes.query_power(alice_charlie, Capability::Witnessing, 100),
| ----------- ^^^^^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`
Check failure on line 650 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:650:32
|
650 | stakes.query_power(charlie_erin, Capability::Mining, 100),
| ----------- ^^^^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`
Check failure on line 646 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:646:32
|
646 | stakes.query_power(bob_david, Capability::Mining, 100),
| ----------- ^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`
Check failure on line 642 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:642:32
|
642 | stakes.query_power(alice_charlie, Capability::Mining, 100),
| ----------- ^^^^^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`
Check failure on line 617 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:617:32
|
617 | stakes.query_power(bob_david, Capability::Mining, 2_000),
| ----------- ^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`
Check failure on line 613 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:613:32
|
613 | stakes.query_power(alice_charlie, Capability::Mining, 2_000),
| ----------- ^^^^^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`
Check failure on line 607 in data_structures/src/staking/stakes.rs
github-actions / clippy
the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
error[E0277]: the trait bound `std::string::String: std::convert::From<(&str, &str)>` is not satisfied
--> data_structures/src/staking/stakes.rs:607:32
|
607 | stakes.query_power(bob_david, Capability::Mining, 1_001),
| ----------- ^^^^^^^^^ the trait `std::convert::From<(&str, &str)>` is not implemented for `std::string::String`, which is required by `(&str, &str): std::convert::Into<std::string::String>`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<std::string::String as std::convert::From<char>>
<std::string::String as std::convert::From<bip39::mnemonic::Mnemonic>>
<std::string::String as std::convert::From<std::boxed::Box<str>>>
<std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
<std::string::String as std::convert::From<rocksdb::Error>>
<std::string::String as std::convert::From<&str>>
<std::string::String as std::convert::From<&mut str>>
<std::string::String as std::convert::From<&std::string::String>>
= note: required for `(&str, &str)` to implement `std::convert::Into<std::string::String>`
note: required by a bound in `staking::stakes::Stakes::<Address, Coins, Epoch, Power>::query_power`
--> data_structures/src/staking/stakes.rs:213:14
|
206 | pub fn query_power<ISK>(
| ----------- required by a bound in this associated function
...
213 | ISK: Into<Address>,
| ^^^^^^^^^^^^^ required by this bound in `Stakes::<Address, Coins, Epoch, Power>::query_power`