Skip to content

Commit

Permalink
Remove useless import statements, fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
eval-exec committed Apr 23, 2024
1 parent df22f01 commit 4228a4d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
3 changes: 1 addition & 2 deletions tx-pool/src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::util::{
non_contextual_verify, time_relative_verify, verify_rtx,
};
use ckb_chain_spec::consensus::MAX_BLOCK_PROPOSALS_LIMIT;
use ckb_error::{AnyError, Error, InternalErrorKind};
use ckb_error::{AnyError, InternalErrorKind};
use ckb_jsonrpc_types::BlockTemplate;
use ckb_logger::Level::Trace;
use ckb_logger::{debug, error, info, log_enabled_target, trace_target};
Expand All @@ -20,7 +20,6 @@ use ckb_snapshot::Snapshot;
use ckb_store::data_loader_wrapper::AsDataLoader;
use ckb_store::ChainStore;
use ckb_types::core::error::OutPointError;
use ckb_types::core::tx_pool::EntryCompleted;
use ckb_types::{
core::{cell::ResolvedTransaction, BlockView, Capacity, Cycle, HeaderView, TransactionView},
packed::{Byte32, ProposalShortId},
Expand Down
2 changes: 1 addition & 1 deletion tx-pool/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use ckb_types::{
packed::{Byte32, ProposalShortId},
};
use ckb_util::{LinkedHashMap, LinkedHashSet};
use ckb_verification::cache::{Completed, TxVerificationCache};
use ckb_verification::cache::TxVerificationCache;
use std::collections::{HashMap, HashSet, VecDeque};
use std::sync::{
atomic::{AtomicBool, Ordering},
Expand Down
9 changes: 4 additions & 5 deletions verification/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use ckb_types::{
core::{Capacity, Cycle, EntryCompleted},
packed::Byte32,
};
use std::collections::hash_map::Entry;
use std::sync::Arc;

/// TX verification lru cache
Expand Down Expand Up @@ -45,11 +44,11 @@ pub struct Completed {
pub fee: Capacity,
}

impl Into<EntryCompleted> for Completed {
fn into(self) -> EntryCompleted {
impl From<Completed> for EntryCompleted {
fn from(value: Completed) -> Self {
EntryCompleted {
cycles: self.cycles,
fee: self.fee,
cycles: value.cycles,
fee: value.fee,
}
}
}
Expand Down

0 comments on commit 4228a4d

Please sign in to comment.