diff options
author | hozan23 <hozan23@karyontech.net> | 2024-06-27 03:52:18 +0200 |
---|---|---|
committer | hozan23 <hozan23@karyontech.net> | 2024-06-27 23:32:10 +0200 |
commit | bcc6721257889f85f57af1b40351540585ffd41d (patch) | |
tree | 915adea7454fa91eafadfd9e7f9834a7cd0d9ebc /p2p/src/protocols | |
parent | 7e4e25d9fbac403b0d46e8081baf00fb3865d56d (diff) |
Remove redundant type aliases
Diffstat (limited to 'p2p/src/protocols')
-rw-r--r-- | p2p/src/protocols/ping.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/p2p/src/protocols/ping.rs b/p2p/src/protocols/ping.rs index 654644a..ef1b54e 100644 --- a/p2p/src/protocols/ping.rs +++ b/p2p/src/protocols/ping.rs @@ -16,8 +16,8 @@ use karyon_core::{ use karyon_net::Error as NetError; use crate::{ - peer::ArcPeer, - protocol::{ArcProtocol, Protocol, ProtocolEvent, ProtocolID}, + peer::Peer, + protocol::{Protocol, ProtocolEvent, ProtocolID}, version::Version, Result, }; @@ -31,7 +31,7 @@ enum PingProtocolMsg { } pub struct PingProtocol { - peer: ArcPeer, + peer: Arc<Peer>, ping_interval: u64, ping_timeout: u64, task_group: TaskGroup, @@ -39,7 +39,7 @@ pub struct PingProtocol { impl PingProtocol { #[allow(clippy::new_ret_no_self)] - pub fn new(peer: ArcPeer, executor: Executor) -> ArcProtocol { + pub fn new(peer: Arc<Peer>, executor: Executor) -> Arc<dyn Protocol> { let ping_interval = peer.config().ping_interval; let ping_timeout = peer.config().ping_timeout; Arc::new(Self { |