Skip to content

Commit b1cdf8d

Browse files
feat(yamux): rename symbols to follow module-based naming convention
Implements our naming convention for the `libp2p-yamux` crate. Related: #2217. Pull-Request: #3852.
1 parent 193d2a1 commit b1cdf8d

File tree

35 files changed

+108
-92
lines changed

35 files changed

+108
-92
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/autonat/src/bin/autonat_client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
6565
let transport = tcp::async_io::Transport::default()
6666
.upgrade(Version::V1Lazy)
6767
.authenticate(noise::Config::new(&local_key)?)
68-
.multiplex(yamux::YamuxConfig::default())
68+
.multiplex(yamux::Config::default())
6969
.boxed();
7070

7171
let behaviour = Behaviour::new(local_key.public());

examples/autonat/src/bin/autonat_server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
5454
let transport = tcp::async_io::Transport::default()
5555
.upgrade(Version::V1Lazy)
5656
.authenticate(noise::Config::new(&local_key)?)
57-
.multiplex(yamux::YamuxConfig::default())
57+
.multiplex(yamux::Config::default())
5858
.boxed();
5959

6060
let behaviour = Behaviour::new(local_key.public());

examples/chat-example/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
7878
let tcp_transport = tcp::async_io::Transport::new(tcp::Config::default().nodelay(true))
7979
.upgrade(upgrade::Version::V1Lazy)
8080
.authenticate(noise::Config::new(&id_keys).expect("signing libp2p-noise static keypair"))
81-
.multiplex(yamux::YamuxConfig::default())
81+
.multiplex(yamux::Config::default())
8282
.timeout(std::time::Duration::from_secs(20))
8383
.boxed();
8484
let quic_transport = quic::async_std::Transport::new(quic::Config::new(&id_keys));

examples/dcutr/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ fn main() -> Result<(), Box<dyn Error>> {
100100
.authenticate(
101101
noise::Config::new(&local_key).expect("Signing libp2p-noise static DH keypair failed."),
102102
)
103-
.multiplex(yamux::YamuxConfig::default())
103+
.multiplex(yamux::Config::default())
104104
.boxed();
105105

106106
#[derive(NetworkBehaviour)]

examples/distributed-key-value-store/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
6666
let transport = tcp::async_io::Transport::default()
6767
.upgrade(Version::V1Lazy)
6868
.authenticate(noise::Config::new(&local_key)?)
69-
.multiplex(yamux::YamuxConfig::default())
69+
.multiplex(yamux::Config::default())
7070
.boxed();
7171

7272
// We create a custom network behaviour that combines Kademlia and mDNS.

examples/file-sharing/src/network.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub(crate) async fn new(
5050
let transport = tcp::async_io::Transport::default()
5151
.upgrade(Version::V1Lazy)
5252
.authenticate(noise::Config::new(&id_keys)?)
53-
.multiplex(yamux::YamuxConfig::default())
53+
.multiplex(yamux::Config::default())
5454
.boxed();
5555

5656
// Build the Swarm, connecting the lower layer transport logic with the

examples/identify/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
5454
let transport = tcp::async_io::Transport::default()
5555
.upgrade(Version::V1Lazy)
5656
.authenticate(noise::Config::new(&local_key).unwrap())
57-
.multiplex(yamux::YamuxConfig::default())
57+
.multiplex(yamux::Config::default())
5858
.boxed();
5959

6060
// Create a identify network behaviour.

examples/ipfs-private/src/main.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ use libp2p::{
4141
noise, ping,
4242
pnet::{PnetConfig, PreSharedKey},
4343
swarm::{NetworkBehaviour, SwarmBuilder, SwarmEvent},
44-
tcp,
45-
yamux::YamuxConfig,
46-
Multiaddr, PeerId, Transport,
44+
tcp, yamux, Multiaddr, PeerId, Transport,
4745
};
4846
use std::{env, error::Error, fs, path::Path, str::FromStr, time::Duration};
4947

@@ -53,7 +51,7 @@ pub fn build_transport(
5351
psk: Option<PreSharedKey>,
5452
) -> transport::Boxed<(PeerId, StreamMuxerBox)> {
5553
let noise_config = noise::Config::new(&key_pair).unwrap();
56-
let yamux_config = YamuxConfig::default();
54+
let yamux_config = yamux::Config::default();
5755

5856
let base_transport = tcp::async_io::Transport::new(tcp::Config::default().nodelay(true));
5957
let maybe_encrypted = match psk {

examples/metrics/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ fn main() -> Result<(), Box<dyn Error>> {
7575
tcp::async_io::Transport::default()
7676
.upgrade(Version::V1Lazy)
7777
.authenticate(noise::Config::new(&local_key)?)
78-
.multiplex(yamux::YamuxConfig::default())
78+
.multiplex(yamux::Config::default())
7979
.boxed(),
8080
Behaviour::new(local_pub_key),
8181
local_peer_id,

0 commit comments

Comments
 (0)