aboutsummaryrefslogtreecommitdiff
path: root/p2p/examples
diff options
context:
space:
mode:
authorhozan23 <hozan23@karyontech.net>2024-06-27 03:52:18 +0200
committerhozan23 <hozan23@karyontech.net>2024-06-27 23:32:10 +0200
commitbcc6721257889f85f57af1b40351540585ffd41d (patch)
tree915adea7454fa91eafadfd9e7f9834a7cd0d9ebc /p2p/examples
parent7e4e25d9fbac403b0d46e8081baf00fb3865d56d (diff)
Remove redundant type aliases
Diffstat (limited to 'p2p/examples')
-rw-r--r--p2p/examples/chat.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/p2p/examples/chat.rs b/p2p/examples/chat.rs
index d162371..4dd87c5 100644
--- a/p2p/examples/chat.rs
+++ b/p2p/examples/chat.rs
@@ -10,8 +10,8 @@ use smol::{channel, Executor};
use karyon_p2p::{
endpoint::{Endpoint, Port},
keypair::{KeyPair, KeyPairType},
- protocol::{ArcProtocol, Protocol, ProtocolEvent, ProtocolID},
- ArcPeer, Backend, Config, Error, Version,
+ protocol::{Protocol, ProtocolEvent, ProtocolID},
+ Backend, Config, Error, Peer, Version,
};
use shared::run_executor;
@@ -42,12 +42,12 @@ struct Cli {
pub struct ChatProtocol {
username: String,
- peer: ArcPeer,
+ peer: Arc<Peer>,
executor: Arc<Executor<'static>>,
}
impl ChatProtocol {
- fn new(username: &str, peer: ArcPeer, executor: Arc<Executor<'static>>) -> ArcProtocol {
+ fn new(username: &str, peer: Arc<Peer>, executor: Arc<Executor<'static>>) -> Arc<dyn Protocol> {
Arc::new(Self {
peer,
username: username.to_string(),