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

@@ -28,7 +28,7 @@ impl InMemoryTransport {
// Possibly create a trait register handle instead, as this requires a write and then read. It may not matter for in memory though
let mut events = self.events.write().await;
if let None = events.get(&transport_key) {
if events.get(&transport_key).is_none() {
let (sender, mut receiver) = tokio::sync::broadcast::channel(100);
events.insert(transport_key.clone(), sender);
tokio::spawn(async move {
@@ -64,7 +64,7 @@ impl Transport for InMemoryTransport {
.expect("transport to be available, as we just created it");
sender
.send(TransportEnvelope {
info: event_info.clone(),
info: *event_info,
content,
})
.map_err(|e| anyhow::anyhow!(e.to_string()))