elided extra lifetimes
This commit is contained in:
@@ -18,7 +18,7 @@ pub(crate) struct SpendCredentialIndex<'a> {
|
||||
|
||||
// IndexList is just boilerplate code for fetching a struct's indexes
|
||||
// note that from my understanding this will be converted into a macro at some point in the future
|
||||
impl<'a> IndexList<SpendCredential> for SpendCredentialIndex<'a> {
|
||||
impl IndexList<SpendCredential> for SpendCredentialIndex<'_> {
|
||||
fn get_indexes(&'_ self) -> Box<dyn Iterator<Item = &'_ dyn Index<SpendCredential>> + '_> {
|
||||
let v: Vec<&dyn Index<SpendCredential>> = vec![&self.blinded_serial_number];
|
||||
Box::new(v.into_iter())
|
||||
|
||||
@@ -17,7 +17,7 @@ pub(crate) struct DelegationIndex<'a> {
|
||||
pub(crate) mixnode: MultiIndex<'a, NodeId, Delegation, PrimaryKey>,
|
||||
}
|
||||
|
||||
impl<'a> IndexList<Delegation> for DelegationIndex<'a> {
|
||||
impl IndexList<Delegation> for DelegationIndex<'_> {
|
||||
fn get_indexes(&'_ self) -> Box<dyn Iterator<Item = &'_ dyn Index<Delegation>> + '_> {
|
||||
let v: Vec<&dyn Index<Delegation>> = vec![&self.owner, &self.mixnode];
|
||||
Box::new(v.into_iter())
|
||||
|
||||
@@ -18,7 +18,7 @@ pub(crate) struct GatewayBondIndex<'a> {
|
||||
|
||||
// IndexList is just boilerplate code for fetching a struct's indexes
|
||||
// note that from my understanding this will be converted into a macro at some point in the future
|
||||
impl<'a> IndexList<GatewayBond> for GatewayBondIndex<'a> {
|
||||
impl IndexList<GatewayBond> for GatewayBondIndex<'_> {
|
||||
fn get_indexes(&'_ self) -> Box<dyn Iterator<Item = &'_ dyn Index<GatewayBond>> + '_> {
|
||||
let v: Vec<&dyn Index<GatewayBond>> = vec![&self.owner];
|
||||
Box::new(v.into_iter())
|
||||
|
||||
@@ -24,7 +24,7 @@ pub(crate) struct UnbondedMixnodeIndex<'a> {
|
||||
pub(crate) identity_key: MultiIndex<'a, IdentityKey, UnbondedMixnode, NodeId>,
|
||||
}
|
||||
|
||||
impl<'a> IndexList<UnbondedMixnode> for UnbondedMixnodeIndex<'a> {
|
||||
impl IndexList<UnbondedMixnode> for UnbondedMixnodeIndex<'_> {
|
||||
fn get_indexes(&'_ self) -> Box<dyn Iterator<Item = &'_ dyn Index<UnbondedMixnode>> + '_> {
|
||||
let v: Vec<&dyn Index<UnbondedMixnode>> = vec![&self.owner, &self.identity_key];
|
||||
Box::new(v.into_iter())
|
||||
@@ -58,7 +58,7 @@ pub(crate) struct MixnodeBondIndex<'a> {
|
||||
|
||||
// IndexList is just boilerplate code for fetching a struct's indexes
|
||||
// note that from my understanding this will be converted into a macro at some point in the future
|
||||
impl<'a> IndexList<MixNodeBond> for MixnodeBondIndex<'a> {
|
||||
impl IndexList<MixNodeBond> for MixnodeBondIndex<'_> {
|
||||
fn get_indexes(&'_ self) -> Box<dyn Iterator<Item = &'_ dyn Index<MixNodeBond>> + '_> {
|
||||
let v: Vec<&dyn Index<MixNodeBond>> =
|
||||
vec![&self.owner, &self.identity_key, &self.sphinx_key];
|
||||
|
||||
@@ -75,7 +75,7 @@ pub(crate) struct NymNodeBondIndex<'a> {
|
||||
pub(crate) identity_key: UniqueIndex<'a, IdentityKey, NymNodeBond>,
|
||||
}
|
||||
|
||||
impl<'a> IndexList<NymNodeBond> for NymNodeBondIndex<'a> {
|
||||
impl IndexList<NymNodeBond> for NymNodeBondIndex<'_> {
|
||||
fn get_indexes(&'_ self) -> Box<dyn Iterator<Item = &'_ dyn Index<NymNodeBond>> + '_> {
|
||||
let v: Vec<&dyn Index<NymNodeBond>> = vec![&self.owner, &self.identity_key];
|
||||
Box::new(v.into_iter())
|
||||
@@ -103,7 +103,7 @@ pub(crate) struct UnbondedNymNodeIndex<'a> {
|
||||
pub(crate) identity_key: MultiIndex<'a, IdentityKey, UnbondedNymNode, NodeId>,
|
||||
}
|
||||
|
||||
impl<'a> IndexList<UnbondedNymNode> for UnbondedNymNodeIndex<'a> {
|
||||
impl IndexList<UnbondedNymNode> for UnbondedNymNodeIndex<'_> {
|
||||
fn get_indexes(&'_ self) -> Box<dyn Iterator<Item = &'_ dyn Index<UnbondedNymNode>> + '_> {
|
||||
let v: Vec<&dyn Index<UnbondedNymNode>> = vec![&self.owner, &self.identity_key];
|
||||
Box::new(v.into_iter())
|
||||
|
||||
@@ -52,7 +52,7 @@ mod families_purge {
|
||||
pub label: UniqueIndex<'a, FamilyHeadKey, Family>,
|
||||
}
|
||||
|
||||
impl<'a> IndexList<Family> for FamilyIndex<'a> {
|
||||
impl IndexList<Family> for FamilyIndex<'_> {
|
||||
fn get_indexes(&'_ self) -> Box<dyn Iterator<Item = &'_ dyn Index<Family>> + '_> {
|
||||
let v: Vec<&dyn Index<Family>> = vec![&self.label];
|
||||
Box::new(v.into_iter())
|
||||
|
||||
@@ -14,7 +14,6 @@ impl VestingAccount for Account {
|
||||
|
||||
/// See [VestingAccount::locked_coins] for documentation.
|
||||
/// Returns 0 in case of underflow. Which is fine, as the amount of pledged and delegated tokens can be larger then vesting_coins due to rewards and vesting periods expiring
|
||||
|
||||
// TODO: rename. it's no longer 'locked'... or is it?
|
||||
fn locked_coins(
|
||||
&self,
|
||||
|
||||
Reference in New Issue
Block a user