Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Max Inden <[email protected]>
  • Loading branch information
thomaseizinger and mxinden authored Nov 20, 2023
1 parent d866ca0 commit 14e336e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libp2p/src/builder/phase/quic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ impl<T: AuthenticatedMultiplexedTransport> SwarmBuilder<super::provider::Tokio,

macro_rules! impl_quic_phase_with_websocket {
($providerKebabCase:literal, $providerPascalCase:ty, $websocketStream:ty) => {
#[cfg(all(feature = $providerKebabCase, not(target_arch = "wasm32"), feature = "websocket", feature = "tcp"))]
#[cfg(all(feature = $providerKebabCase, not(target_arch = "wasm32"), feature = "websocket", feature = "tcp", feature = "dns"))]
impl<T: AuthenticatedMultiplexedTransport> SwarmBuilder<$providerPascalCase, QuicPhase<T>> {
/// See [`SwarmBuilder::with_websocket`].
pub async fn with_websocket <
Expand Down
2 changes: 1 addition & 1 deletion libp2p/src/builder/phase/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ impl<Provider> SwarmBuilder<Provider, TcpPhase> {
}
macro_rules! impl_tcp_phase_with_websocket {
($providerKebabCase:literal, $providerPascalCase:ty, $websocketStream:ty) => {
#[cfg(all(feature = $providerKebabCase, not(target_arch = "wasm32"), feature = "websocket", feature = "tcp"))]
#[cfg(all(feature = $providerKebabCase, not(target_arch = "wasm32"), feature = "websocket", feature = "tcp", feature = "dns"))]
impl SwarmBuilder<$providerPascalCase, TcpPhase> {
/// See [`SwarmBuilder::with_websocket`].
pub async fn with_websocket <
Expand Down
4 changes: 2 additions & 2 deletions libp2p/src/builder/phase/websocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,11 @@ impl<Provider, T: AuthenticatedMultiplexedTransport> SwarmBuilder<Provider, Webs

Check failure on line 215 in libp2p/src/builder/phase/websocket.rs

View workflow job for this annotation

GitHub Actions / rustfmt

Diff in /home/runner/work/rust-libp2p/rust-libp2p/libp2p/src/builder/phase/websocket.rs
#[derive(Debug, thiserror::Error)]
#[error(transparent)]
#[cfg(all(not(target_arch = "wasm32"), feature = "websocket", feature = "tcp"))]
#[cfg(all(not(target_arch = "wasm32"), feature = "websocket", feature = "tcp", feature = "dns"))]
pub struct WebsocketError<Sec>(#[from] WebsocketErrorInner<Sec>);

#[derive(Debug, thiserror::Error)]
#[cfg(all(not(target_arch = "wasm32"), feature = "websocket", feature = "tcp"))]
#[cfg(all(not(target_arch = "wasm32"), feature = "websocket", feature = "tcp", feature = "dns"))]

Check failure on line 222 in libp2p/src/builder/phase/websocket.rs

View workflow job for this annotation

GitHub Actions / rustfmt

Diff in /home/runner/work/rust-libp2p/rust-libp2p/libp2p/src/builder/phase/websocket.rs
enum WebsocketErrorInner<Sec> {
#[error("SecurityUpgrade")]
SecurityUpgrade(Sec),
Expand Down

0 comments on commit 14e336e

Please sign in to comment.