deps: Bump smol to 2.0 (#22956)

The collateral of this is that code size is increased by ~300kB, but I
think we can stomach it.

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-01-10 14:38:00 +01:00 committed by GitHub
parent 1f84c1b6c7
commit 9e113bccd0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 187 additions and 330 deletions

View file

@ -32,6 +32,7 @@ use smol::channel;
use std::{
env,
panic::{self, RefUnwindSafe},
pin::Pin,
};
/// Run the given test function with the configured parameters.
@ -85,7 +86,7 @@ pub fn run_test(
/// A test struct for converting an observation callback into a stream.
pub struct Observation<T> {
rx: channel::Receiver<T>,
rx: Pin<Box<channel::Receiver<T>>>,
_subscription: Subscription,
}
@ -108,6 +109,7 @@ pub fn observe<T: 'static>(entity: &impl Entity<T>, cx: &mut TestAppContext) ->
let _ = smol::block_on(tx.send(()));
})
});
let rx = Box::pin(rx);
Observation { rx, _subscription }
}