Skip to content

Commit

Permalink
fix super nit in ServerBuilder (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasad1 authored Oct 12, 2021
1 parent f949d9b commit 07df2f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion http-server/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ impl Builder {
/// Configure a custom [`tokio::runtime::Handle`] to run the server on.
///
/// Default: [`tokio::spawn`]
pub fn custom_tokio_runtime(mut self, rt: tokio::runtime::Handle) {
pub fn custom_tokio_runtime(mut self, rt: tokio::runtime::Handle) -> Self {
self.tokio_runtime = Some(rt);
self
}

/// Finalizes the configuration of the server.
Expand Down
3 changes: 2 additions & 1 deletion ws-server/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,9 @@ impl Builder {
/// Configure a custom [`tokio::runtime::Handle`] to run the server on.
///
/// Default: [`tokio::spawn`]
pub fn custom_tokio_runtime(mut self, rt: tokio::runtime::Handle) {
pub fn custom_tokio_runtime(mut self, rt: tokio::runtime::Handle) -> Self {
self.settings.tokio_runtime = Some(rt);
self
}

/// Finalize the configuration of the server. Consumes the [`Builder`].
Expand Down

0 comments on commit 07df2f8

Please sign in to comment.