Skip to content

Commit f2bedff

Browse files
committed
fixup
1 parent 4df9c5f commit f2bedff

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

deltachat-ffi/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,16 @@ where
119119
RT.spawn(fut)
120120
}
121121

122-
fn spawn_with_context<T>(context: &Context, fut: T) -> T::Output
122+
fn spawn_with_context<T>(context: &Context, fut: T) -> JoinHandle<T::Output>
123123
where
124124
T: Future + Send + 'static,
125125
T::Output: Send + 'static,
126126
{
127127
let subscriber = Registry::default().with(context.to_layer());
128+
let context_id = context.get_id();
128129
RT.spawn(
129-
async {
130-
let ffi_span = info_span!("ffi_span", context_id = context.get_id());
130+
async move {
131+
let ffi_span = info_span!("ffi_span", context_id = context_id);
131132
fut.instrument(ffi_span).await
132133
}
133134
.with_subscriber(subscriber),

0 commit comments

Comments
 (0)