Skip to content

Commit

Permalink
Simplify tls and noise construction
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden committed Sep 25, 2023
1 parent 7f6da36 commit 10b3bc1
Showing 1 changed file with 7 additions and 19 deletions.
26 changes: 7 additions & 19 deletions libp2p/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ mod tests {
.with_tokio()
.with_tcp(
Default::default(),
(|keypair: &Keypair| libp2p_tls::Config::new(keypair),),
(libp2p_tls::Config::new,),
(
libp2p_yamux::Config::default(),
libp2p_mplex::MplexConfig::default(),
Expand All @@ -1532,10 +1532,7 @@ mod tests {
.with_tokio()
.with_tcp(
Default::default(),
(
|keypair: &Keypair| libp2p_tls::Config::new(keypair),
|keypair: &Keypair| libp2p_noise::Config::new(keypair),
),
(libp2p_tls::Config::new, libp2p_noise::Config::new),
(
libp2p_yamux::Config::default(),
libp2p_mplex::MplexConfig::default(),
Expand All @@ -1560,10 +1557,7 @@ mod tests {
.with_tokio()
.with_tcp(
Default::default(),
(
|keypair: &Keypair| libp2p_tls::Config::new(keypair),
|keypair: &Keypair| libp2p_noise::Config::new(keypair),
),
(libp2p_tls::Config::new, libp2p_noise::Config::new),
(libp2p_yamux::Config::default(),),
)
.unwrap()
Expand Down Expand Up @@ -1593,7 +1587,7 @@ mod tests {
.with_tokio()
.with_tcp(
Default::default(),
(|keypair: &Keypair| libp2p_tls::Config::new(keypair),),
(libp2p_tls::Config::new,),
(libp2p_yamux::Config::default(),),
)
.unwrap()
Expand Down Expand Up @@ -1623,10 +1617,7 @@ mod tests {
.with_tokio()
.with_tcp(
Default::default(),
(
|keypair: &Keypair| libp2p_tls::Config::new(keypair),
|keypair: &Keypair| libp2p_noise::Config::new(keypair),
),
(libp2p_tls::Config::new, libp2p_noise::Config::new),
(libp2p_yamux::Config::default(),),
)
.unwrap()
Expand Down Expand Up @@ -1674,10 +1665,7 @@ mod tests {
.with_tokio()
.with_tcp(
Default::default(),
(
|keypair: &Keypair| libp2p_tls::Config::new(keypair),
|keypair: &Keypair| libp2p_noise::Config::new(keypair),
),
(libp2p_tls::Config::new, libp2p_noise::Config::new),
(libp2p_yamux::Config::default(),),
)
.unwrap()
Expand Down Expand Up @@ -1714,7 +1702,7 @@ mod tests {
.with_tokio()
.with_tcp(
Default::default(),
(|keypair: &Keypair| libp2p_tls::Config::new(keypair),),
(libp2p_tls::Config::new,),
(libp2p_yamux::Config::default(),),
)
.unwrap()
Expand Down

0 comments on commit 10b3bc1

Please sign in to comment.