Skip to content

Commit

Permalink
Fix cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
eval-exec committed Dec 25, 2023
1 parent 97e561e commit 66424d4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tx-pool/src/component/sort_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ impl Ord for AncestorsScoreSortKey {
}
}

impl Into<CoreAncestorsScoreSortKey> for AncestorsScoreSortKey {
fn into(self) -> CoreAncestorsScoreSortKey {
impl From<AncestorsScoreSortKey> for CoreAncestorsScoreSortKey {
fn from(val: AncestorsScoreSortKey) -> Self {
CoreAncestorsScoreSortKey {
fee: self.fee,
weight: self.weight,
ancestors_fee: self.ancestors_fee,
ancestors_weight: self.ancestors_weight,
fee: val.fee,
weight: val.weight,
ancestors_fee: val.ancestors_fee,
ancestors_weight: val.ancestors_weight,
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions util/types/src/core/tx_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,13 @@ pub struct TxPoolInfo {
/// A struct as a sorted key in tx-pool
#[derive(Eq, PartialEq, Clone, Debug, Default)]
pub struct AncestorsScoreSortKey {
/// fee
pub fee: Capacity,
/// weight
pub weight: u64,
/// ancestors_fee
pub ancestors_fee: Capacity,
/// ancestors_weight
pub ancestors_weight: u64,
}

Expand Down

0 comments on commit 66424d4

Please sign in to comment.