Skip to content

Commit

Permalink
rspc_axum: feature flag with_websocket in new
Browse files Browse the repository at this point in the history
  • Loading branch information
oscartbeaumont committed Aug 26, 2024
1 parent 6ed156b commit b9e3fc6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions integrations/axum/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ impl<TCtx: Send + Sync + 'static> Endpoint<TCtx> {
// F: Future<Output = Result<TCtx, ()>> + Send + Sync + 'static,
TCtx: Clone,
{
Self::builder(router)
.with_endpoints()
.with_websocket()
.with_batching()
.build(ctx_fn)
let mut t = Self::builder(router).with_endpoints();
#[cfg(feature = "ws")]
{
t = t.with_websocket();
}
t.with_batching().build(ctx_fn)
}

/// Construct a new [`Endpoint`](Endpoint) with no features enabled.
Expand Down

0 comments on commit b9e3fc6

Please sign in to comment.