From 8624d85a89a0b984f4d39da59a02bb8dd77de236 Mon Sep 17 00:00:00 2001
From: "sinu.eth" <65924192+sinui0@users.noreply.github.com>
Date: Wed, 31 Jan 2024 15:28:41 -0800
Subject: [PATCH] fix: update doctests to use smol feature (#215)
---
xtra/src/lib.rs | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/xtra/src/lib.rs b/xtra/src/lib.rs
index 2c912f0..8803bcc 100644
--- a/xtra/src/lib.rs
+++ b/xtra/src/lib.rs
@@ -291,13 +291,12 @@ where
/// }
/// }
///
-/// # #[cfg(feature = "with-smol-1")]
-/// # smol::block_on(async {
-/// let addr = MyActor.create(None).spawn(&mut xtra::spawn::Smol::Global);
-/// assert!(addr.is_connected());
-/// assert_eq!(addr.send(Selecting).await, Ok(true)); // Assert that the select did end early
-/// # })
-///
+/// # #[cfg(feature = "smol")]
+/// smol::block_on(async {
+/// let addr = xtra::spawn_smol(MyActor, Mailbox::unbounded());
+/// assert!(addr.is_connected());
+/// assert_eq!(addr.send(Selecting).await, Ok(true)); // Assert that the select did end early
+/// })
/// ```
pub async fn select(mailbox: &Mailbox, actor: &mut A, mut fut: F) -> Either
where
@@ -368,12 +367,13 @@ where
/// }
/// }
///
-/// # #[cfg(feature = "with-smol-1")]
-/// # smol::block_on(async {
-/// let addr = MyActor.create(None).spawn(&mut xtra::spawn::Smol::Global);
-/// assert!(addr.is_connected());
-/// assert_eq!(addr.send(Joining).await, Ok(true)); // Assert that the join did evaluate the future
-/// # })
+/// # #[cfg(feature = "smol")]
+/// smol::block_on(async {
+/// let addr = xtra::spawn_smol(MyActor, Mailbox::unbounded());
+/// assert!(addr.is_connected());
+/// assert_eq!(addr.send(Joining).await, Ok(true)); // Assert that the join did evaluate the future
+/// })
+/// ```
pub async fn join(mailbox: &Mailbox, actor: &mut A, fut: F) -> R
where
F: Future