Skip to content

Commit

Permalink
Simplify trait bound
Browse files Browse the repository at this point in the history
  • Loading branch information
boundless-forest committed May 15, 2024
1 parent 275c286 commit e0b7358
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions client/db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@ use std::sync::Arc;

// Substrate
pub use sc_client_db::DatabaseSource;
use sp_blockchain::HeaderBackend;
use sp_runtime::traits::Block as BlockT;

pub mod kv;
#[cfg(feature = "sql")]
pub mod sql;

#[derive(Clone)]
pub enum Backend<Block: BlockT, C: HeaderBackend<Block>> {
pub enum Backend<Block: BlockT, C> {
KeyValue(Arc<kv::Backend<Block, C>>),
#[cfg(feature = "sql")]
Sql(Arc<sql::Backend<Block>>),
Expand Down
4 changes: 2 additions & 2 deletions client/mapping-sync/src/kv/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ pub struct MappingSyncWorker<Block: BlockT, C, BE> {
Arc<crate::EthereumBlockNotificationSinks<crate::EthereumBlockNotification<Block>>>,
}

impl<Block: BlockT, C: HeaderBackend<Block>, BE> Unpin for MappingSyncWorker<Block, C, BE> {}
impl<Block: BlockT, C, BE> Unpin for MappingSyncWorker<Block, C, BE> {}

impl<Block: BlockT, C: HeaderBackend<Block>, BE> MappingSyncWorker<Block, C, BE> {
impl<Block: BlockT, C, BE> MappingSyncWorker<Block, C, BE> {
pub fn new(
import_notifications: ImportNotifications<Block>,
timeout: Duration,
Expand Down
2 changes: 1 addition & 1 deletion template/node/src/rpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ mod eth;
pub use self::eth::{create_eth, EthDeps};

/// Full client dependencies.
pub struct FullDeps<C: HeaderBackend<Block>, P, A: ChainApi, CT, CIDP> {
pub struct FullDeps<C, P, A: ChainApi, CT, CIDP> {
/// The client instance to use.
pub client: Arc<C>,
/// Transaction pool instance.
Expand Down

0 comments on commit e0b7358

Please sign in to comment.