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())); .and_then(|m| m.ctx.clone()));
let timeout = self let timeout = self
.timeout .timeout
.clone() .take()
.unwrap_or(ctx.default_reply_timeout.clone()); .unwrap_or_else(|| ctx.default_reply_timeout.clone());
let event_id = match poll_unwrap!(emit_metadata.event_metadata.as_mut()).get_event() { let event_id = match poll_unwrap!(emit_metadata.event_metadata.as_mut()).get_event() {
Ok(e) => e.id(), Ok(e) => e.id(),

Loading…
Cancel
Save