Merge pull request #21 from Trivernis/develop

Remove debug requirement for emitted payloads since its not used anyway
pull/24/head
Julius Riegel 3 years ago committed by GitHub
commit 0c65dede74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
Cargo.lock generated

@ -511,7 +511,7 @@ dependencies = [
[[package]] [[package]]
name = "rmp-ipc" name = "rmp-ipc"
version = "0.9.1" version = "0.9.2"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"byteorder", "byteorder",

@ -1,6 +1,6 @@
[package] [package]
name = "rmp-ipc" name = "rmp-ipc"
version = "0.9.1" version = "0.9.2"
authors = ["trivernis <trivernis@protonmail.com>"] authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018" edition = "2018"
readme = "README.md" readme = "README.md"

@ -39,7 +39,7 @@ where
/// A payload wrapper type for sending bytes directly without /// A payload wrapper type for sending bytes directly without
/// serializing them /// serializing them
#[derive(Clone, Debug)] #[derive(Clone)]
pub struct BytePayload { pub struct BytePayload {
bytes: Vec<u8>, bytes: Vec<u8>,
} }

@ -4,7 +4,6 @@ use crate::events::event::Event;
use crate::events::payload::EventSendPayload; use crate::events::payload::EventSendPayload;
use crate::ipc::context::Context; use crate::ipc::context::Context;
use crate::protocol::AsyncProtocolStream; use crate::protocol::AsyncProtocolStream;
use std::fmt::Debug;
use std::sync::Arc; use std::sync::Arc;
use tokio::io::AsyncWriteExt; use tokio::io::AsyncWriteExt;
use tokio::sync::Mutex; use tokio::sync::Mutex;
@ -38,7 +37,7 @@ where
} }
#[tracing::instrument(level = "trace", skip(self, data))] #[tracing::instrument(level = "trace", skip(self, data))]
pub async fn _emit<T: EventSendPayload + Debug>( pub async fn _emit<T: EventSendPayload>(
&self, &self,
namespace: Option<&str>, namespace: Option<&str>,
event: &str, event: &str,
@ -66,7 +65,7 @@ where
} }
/// Emits an event /// Emits an event
pub async fn emit<S: AsRef<str>, T: EventSendPayload + Debug>( pub async fn emit<S: AsRef<str>, T: EventSendPayload>(
&self, &self,
event: S, event: S,
data: T, data: T,
@ -75,7 +74,7 @@ where
} }
/// Emits an event to a specific namespace /// Emits an event to a specific namespace
pub async fn emit_to<S1: AsRef<str>, S2: AsRef<str>, T: EventSendPayload + Debug>( pub async fn emit_to<S1: AsRef<str>, S2: AsRef<str>, T: EventSendPayload>(
&self, &self,
namespace: S1, namespace: S1,
event: S2, event: S2,
@ -86,7 +85,7 @@ where
} }
/// Emits a response to an event /// Emits a response to an event
pub async fn emit_response<S: AsRef<str>, T: EventSendPayload + Debug>( pub async fn emit_response<S: AsRef<str>, T: EventSendPayload>(
&self, &self,
event_id: u64, event_id: u64,
event: S, event: S,
@ -96,7 +95,7 @@ where
} }
/// Emits a response to an event to a namespace /// Emits a response to an event to a namespace
pub async fn emit_response_to<S1: AsRef<str>, S2: AsRef<str>, T: EventSendPayload + Debug>( pub async fn emit_response_to<S1: AsRef<str>, S2: AsRef<str>, T: EventSendPayload>(
&self, &self,
event_id: u64, event_id: u64,
namespace: S1, namespace: S1,

Loading…
Cancel
Save