fixup! Use explicit return statement TaskStorage::spawn
This commit is contained in:
parent
34493c7ed6
commit
0ce29ca84c
@ -165,7 +165,7 @@ impl<F: Future + 'static> TaskStorage<F> {
|
|||||||
/// on a different executor.
|
/// on a different executor.
|
||||||
pub fn spawn(&'static self, future: impl FnOnce() -> F) -> SpawnToken<impl Sized> {
|
pub fn spawn(&'static self, future: impl FnOnce() -> F) -> SpawnToken<impl Sized> {
|
||||||
if self.spawn_mark_used() {
|
if self.spawn_mark_used() {
|
||||||
return unsafe { SpawnToken::<F>::new(self.spawn_initialize(future)) }
|
return unsafe { SpawnToken::<F>::new(self.spawn_initialize(future)) };
|
||||||
}
|
}
|
||||||
|
|
||||||
SpawnToken::<F>::new_failed()
|
SpawnToken::<F>::new_failed()
|
||||||
|
Loading…
Reference in New Issue
Block a user