Skip to content

Commit

Permalink
[#29] Improves formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
hydroid7 committed Dec 16, 2023
1 parent c31ca4b commit 4f2f242
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 24 deletions.
13 changes: 0 additions & 13 deletions examples/examples/pretty_print.rs

This file was deleted.

46 changes: 35 additions & 11 deletions iceoryx2/src/service/port_factory/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
//! # }
//! ```
use iceoryx2_cal::dynamic_storage::DynamicStorage;
use service::{zero_copy, process_local};
use service::{process_local, zero_copy};

use crate::service::{self, static_config};
use crate::service::{dynamic_config, ServiceName};
Expand Down Expand Up @@ -136,11 +136,23 @@ impl<'config> fmt::Display for PortFactory<'config, zero_copy::Service<'config>>
f.debug_struct("zero_copy::Service")
.field("name", &String::from(self.name().deref()))
.field("uuid", &self.uuid())
.field("max listeners", &self.static_config().max_supported_listeners())
.field("max notifiers", &self.static_config().max_supported_notifiers())
.field("active listeners", &self.dynamic_config().number_of_listeners())
.field("active notifiers", &self.dynamic_config().number_of_notifiers())
.finish()
.field(
"max listeners",
&self.static_config().max_supported_listeners(),
)
.field(
"max notifiers",
&self.static_config().max_supported_notifiers(),
)
.field(
"active listeners",
&self.dynamic_config().number_of_listeners(),
)
.field(
"active notifiers",
&self.dynamic_config().number_of_notifiers(),
)
.finish()
}
}

Expand All @@ -149,10 +161,22 @@ impl<'config> fmt::Display for PortFactory<'config, process_local::Service<'conf
f.debug_struct("process_local::Service")
.field("name", &String::from(self.name().deref()))
.field("uuid", &self.uuid())
.field("max listeners", &self.static_config().max_supported_listeners())
.field("max notifiers", &self.static_config().max_supported_notifiers())
.field("active listeners", &self.dynamic_config().number_of_listeners())
.field("active notifiers", &self.dynamic_config().number_of_notifiers())
.finish()
.field(
"max listeners",
&self.static_config().max_supported_listeners(),
)
.field(
"max notifiers",
&self.static_config().max_supported_notifiers(),
)
.field(
"active listeners",
&self.dynamic_config().number_of_listeners(),
)
.field(
"active notifiers",
&self.dynamic_config().number_of_notifiers(),
)
.finish()
}
}

0 comments on commit 4f2f242

Please sign in to comment.