summaryrefslogtreecommitdiffstats
path: root/crates/core/tedge_api
diff options
context:
space:
mode:
authorMarcel Müller <m.mueller@ifm.com>2022-05-20 10:35:21 +0200
committerMatthias Beyer <matthias.beyer@ifm.com>2022-05-20 12:54:00 +0200
commitd3903812d74befde0271a830ba9b28ad56031c62 (patch)
treebf0af1c10614139e9ec9053b4c5ce8606bf2fa0c /crates/core/tedge_api
parenta42bd5ad94527f7a30523ea78b440228127107b8 (diff)
Add a custom debug impl for InternalMessage
Previously it also printed the 'reply_sender' which was very noisy and provides no added information to users. Signed-off-by: Marcel Müller <m.mueller@ifm.com>
Diffstat (limited to 'crates/core/tedge_api')
-rw-r--r--crates/core/tedge_api/src/address.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/crates/core/tedge_api/src/address.rs b/crates/core/tedge_api/src/address.rs
index 5052d621..14d14e13 100644
--- a/crates/core/tedge_api/src/address.rs
+++ b/crates/core/tedge_api/src/address.rs
@@ -13,12 +13,19 @@ use crate::{
pub type AnyMessageBox = Box<dyn Message>;
#[doc(hidden)]
-#[derive(Debug)]
pub struct InternalMessage {
pub(crate) data: AnyMessageBox,
pub(crate) reply_sender: tokio::sync::oneshot::Sender<AnyMessageBox>,
}
+impl std::fmt::Debug for InternalMessage {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ f.debug_struct("InternalMessage")
+ .field("data", &self.data)
+ .finish_non_exhaustive()
+ }
+}
+
#[doc(hidden)]
#[derive(Debug)]
pub enum ShouldWait {