diff --git a/shared/src/shared_builder.rs b/shared/src/shared_builder.rs index e8bb9f97736..c958af724ed 100644 --- a/shared/src/shared_builder.rs +++ b/shared/src/shared_builder.rs @@ -176,7 +176,7 @@ impl SharedBuilder { notify_config: None, store_config: None, block_assembler_config: None, - async_handle: runtime.borrow().get_or_init(new_background_runtime).clone(), + async_handle: runtime.get_or_init(new_background_runtime).clone(), }) } } diff --git a/util/network-alert/src/tests/test_notifier.rs b/util/network-alert/src/tests/test_notifier.rs index fc793dc5e81..86c77b09828 100644 --- a/util/network-alert/src/tests/test_notifier.rs +++ b/util/network-alert/src/tests/test_notifier.rs @@ -4,7 +4,6 @@ use ckb_notify::NotifyService; use ckb_types::{packed, prelude::*}; use once_cell::unsync; -use std::borrow::Borrow; fn build_alert( id: u32, @@ -33,7 +32,7 @@ fn new_notifier(version: &str) -> Notifier { let notify_controller = RUNTIME_HANDLE.with(|runtime| { NotifyService::new( Default::default(), - runtime.borrow().get_or_init(new_background_runtime).clone(), + runtime.get_or_init(new_background_runtime).clone(), ) .start() });