chore: fix

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2023-09-24 01:14:50 +02:00
parent ca532681e5
commit 8a648c98cc
10 changed files with 24 additions and 24 deletions

View File

@@ -33,7 +33,7 @@ impl crunch_traits::Persistence for InMemoryPersistence {
let msg = crunch_envelope::proto::wrap(event_info.domain, event_info.entity_type, &content);
let msg = Msg {
id: uuid::Uuid::new_v4().to_string(),
info: event_info.clone(),
info: *event_info,
msg,
state: MsgState::Pending,
};
@@ -61,8 +61,7 @@ impl crunch_traits::Persistence for InMemoryPersistence {
.read()
.await
.get(event_id)
.filter(|m| m.state == MsgState::Pending)
.map(|m| m.clone())
.filter(|m| m.state == MsgState::Pending).cloned()
.map(|m| (m.info, m.msg)))
}

View File

@@ -131,6 +131,7 @@ pub mod builder {
.clone();
}
#[allow(unreachable_code)]
Self {
persistence: None,
transport: None,

View File

@@ -1,4 +1,4 @@
use crunch_traits::{Event, EventInfo};
use crunch_traits::{Event};
use futures::StreamExt;
use crate::{errors, Transport};