Skip to content

Commit

Permalink
Cleanup default_runtime method
Browse files Browse the repository at this point in the history
  • Loading branch information
al8n committed Jan 24, 2024
1 parent 71d9dc4 commit 212baa5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions quinn/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ pub trait AsyncUdpSocket: Send + Sync + Debug + 'static {
///
/// If `runtime-tokio` is enabled and this function is called from within a Tokio runtime context,
/// then `TokioRuntime` is returned. Otherwise, if `runtime-async-std` is enabled, `AsyncStdRuntime`
/// is returned. Otherwise, `None` is returned.
/// is returned. Otherwise, if `runtime-smol` is enabled, `SmolRuntime` is returned.
/// Otherwise, `None` is returned.
pub fn default_runtime() -> Option<Arc<dyn Runtime>> {
#[cfg(feature = "runtime-tokio")]
{
Expand All @@ -89,7 +90,6 @@ pub fn default_runtime() -> Option<Arc<dyn Runtime>> {
return Some(Arc::new(SmolRuntime));
}

#[cfg(not(feature = "runtime-async-std"))]
None
}

Expand Down

0 comments on commit 212baa5

Please sign in to comment.