Replace one unwrap_or with unwrap_or_else

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/32/head
trivernis 3 years ago
parent 18412c4a2f
commit 1effb4f6c9
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -42,8 +42,8 @@ impl<P: IntoPayload + Send + Sync + 'static> Future for EmitMetadataWithResponse
.and_then(|m| m.ctx.clone()));
let timeout = self
.timeout
.clone()
.unwrap_or(ctx.default_reply_timeout.clone());
.take()
.unwrap_or_else(|| ctx.default_reply_timeout.clone());
let event_id = match poll_unwrap!(emit_metadata.event_metadata.as_mut()).get_event() {
Ok(e) => e.id(),

Loading…
Cancel
Save