Skip to content

Commit 2e042d8

Browse files
committed
protocols/autonat: clippy::module_name_repetitions
1 parent 28f3514 commit 2e042d8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

protocols/autonat/src/behaviour.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ use std::{
3939

4040
type FiniteAddrScore = u32;
4141

42-
pub struct AutoNat {
42+
pub struct Behaviour {
4343
inner: RequestResponse<AutoNatCodec>,
4444
local_addresses: HashMap<Multiaddr, FiniteAddrScore>,
4545
pending_inbound: HashMap<PeerId, ResponseChannel<DialResponse>>,
4646
pending_outbound: HashSet<PeerId>,
4747
send_request: VecDeque<PeerId>,
4848
}
4949

50-
impl Default for AutoNat {
50+
impl Default for Behaviour {
5151
fn default() -> Self {
5252
let protocols = iter::once((AutoNatProtocol, ProtocolSupport::Full));
5353
let cfg = RequestResponseConfig::default();
@@ -62,15 +62,15 @@ impl Default for AutoNat {
6262
}
6363
}
6464

65-
impl AutoNat {
65+
impl Behaviour {
6666
pub fn add_local_address(&mut self, address: Multiaddr) {
6767
if self.local_addresses.get(&address).is_none() {
6868
self.local_addresses.insert(address, 1);
6969
}
7070
}
7171
}
7272

73-
impl NetworkBehaviour for AutoNat {
73+
impl NetworkBehaviour for Behaviour {
7474
type ProtocolsHandler = <RequestResponse<AutoNatCodec> as NetworkBehaviour>::ProtocolsHandler;
7575
type OutEvent = ();
7676

@@ -222,7 +222,7 @@ impl NetworkBehaviour for AutoNat {
222222
self.inner.inject_new_external_addr(addr);
223223
match self.local_addresses.get_mut(addr) {
224224
Some(score) if *score == 0 => *score = 1,
225-
Some(_) => {},
225+
Some(_) => {}
226226
None => {
227227
self.local_addresses.insert(addr.clone(), 1);
228228
}

protocols/autonat/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
//! Implementation of the [AutoNAT] protocol.
2222
23-
pub use self::behaviour::AutoNat;
23+
pub use self::behaviour::Behaviour;
2424

2525
mod behaviour;
2626
mod protocol;

0 commit comments

Comments
 (0)