refactor(dcutr): reshape public API to follow naming guidelines (#3214)

With this patch, the naming of types follows the guidelines discussed in #2217.
This commit is contained in:
Thomas Eizinger
2022-12-20 16:03:40 +11:00
committed by GitHub
parent 06aa694d0a
commit 93335b8818
7 changed files with 65 additions and 32 deletions

View File

@@ -114,7 +114,7 @@ fn main() -> Result<(), Box<dyn Error>> {
relay_client: Client,
ping: ping::Behaviour,
identify: identify::Behaviour,
dcutr: dcutr::behaviour::Behaviour,
dcutr: dcutr::Behaviour,
}
#[derive(Debug)]
@@ -123,7 +123,7 @@ fn main() -> Result<(), Box<dyn Error>> {
Ping(ping::Event),
Identify(identify::Event),
Relay(client::Event),
Dcutr(dcutr::behaviour::Event),
Dcutr(dcutr::Event),
}
impl From<ping::Event> for Event {
@@ -144,8 +144,8 @@ fn main() -> Result<(), Box<dyn Error>> {
}
}
impl From<dcutr::behaviour::Event> for Event {
fn from(e: dcutr::behaviour::Event) -> Self {
impl From<dcutr::Event> for Event {
fn from(e: dcutr::Event) -> Self {
Event::Dcutr(e)
}
}
@@ -157,7 +157,7 @@ fn main() -> Result<(), Box<dyn Error>> {
"/TODO/0.0.1".to_string(),
local_key.public(),
)),
dcutr: dcutr::behaviour::Behaviour::new(local_peer_id),
dcutr: dcutr::Behaviour::new(local_peer_id),
};
let mut swarm = match ThreadPool::new() {