From 549b4e9fb16a94eceba4d6f8d71b7dfebe4d0645 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Sat, 15 Jun 2019 09:01:37 +0200 Subject: [PATCH] fix(compile warn): &mut Trait -> dyn &mut Trait (#2872) --- substrate/core/client/db/src/lib.rs | 2 +- substrate/core/network/src/protocol/sync.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/substrate/core/client/db/src/lib.rs b/substrate/core/client/db/src/lib.rs index b44953a80f..b1c0596a0e 100644 --- a/substrate/core/client/db/src/lib.rs +++ b/substrate/core/client/db/src/lib.rs @@ -715,7 +715,7 @@ impl> Backend { } #[cfg(any(test, feature = "test-helpers"))] - pub fn new_test_db(keep_blocks: u32, canonicalization_delay: u64, db: Arc) -> Self { + pub fn new_test_db(keep_blocks: u32, canonicalization_delay: u64, db: Arc) -> Self { let db_setting = DatabaseSettings { cache_size: None, diff --git a/substrate/core/network/src/protocol/sync.rs b/substrate/core/network/src/protocol/sync.rs index 0f78348b18..751e3f872e 100644 --- a/substrate/core/network/src/protocol/sync.rs +++ b/substrate/core/network/src/protocol/sync.rs @@ -587,7 +587,7 @@ impl ChainSync { /// A batch of blocks have been processed, with or without errors. /// Call this when a batch of blocks have been processed by the import queue, with or without /// errors. - pub fn blocks_processed(&mut self, protocol: &mut Context, processed_blocks: Vec, has_error: bool) { + pub fn blocks_processed(&mut self, protocol: &mut dyn Context, processed_blocks: Vec, has_error: bool) { for hash in processed_blocks { self.queue_blocks.remove(&hash); }