Diffstat (limited to 'src/protocol.rs')
-rw-r--r--src/protocol.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/protocol.rs b/src/protocol.rs
index 238dd5e..17bd651 100644
--- a/src/protocol.rs
+++ b/src/protocol.rs
@@ -1,7 +1,8 @@
//! Interface for interfaces.
//!
//! ## Design
-//! The design of protocols is based on an idea found in the [`gdbstub`](https://docs.rs/gdbstub/latest/gdbstub/target/ext/index.html) crate.
+//! The design of protocols is based on an idea found in the
+//! [`gdbstub`](https://docs.rs/gdbstub/latest/gdbstub/target/ext/index.html) crate.
//! This idea is of so called inlinable dyn extension traits.
//! However, in the form given in `gdbstub` they can't be used for arbitrary interfaces.
//! The main trait still needs to know about all the possible protocols.
@@ -122,9 +123,13 @@ macro_rules! implementer {
} => {
impl<$ctx $($generic)*> $crate::protocol::Implementer<$ctx> for $name {
#[inline]
- fn interface(&mut self, id: $crate::protocol::ProtocolId) -> ::core::option::Option<$crate::protocol::AnyImpl<'_, $ctx>> {
+ fn interface(
+ &mut self,
+ id: $crate::protocol::ProtocolId
+ ) -> ::core::option::Option<$crate::protocol::AnyImpl<'_, $ctx>> {
match id {
- $(id if id == $crate::protocol::ProtocolId::of::<$protocol>() => Some($crate::protocol::AnyImpl::new::<$protocol>(self)),)*
+ $(id if id == $crate::protocol::ProtocolId::of::<$protocol>()
+ => Some($crate::protocol::AnyImpl::new::<$protocol>(self)),)*
_ => None
}
}