diff options
author | hozan23 <hozan23@proton.me> | 2023-11-13 15:03:15 +0300 |
---|---|---|
committer | hozan23 <hozan23@proton.me> | 2023-11-13 15:03:15 +0300 |
commit | f0729022589ee8e48b5558ab30462f95d06fe6df (patch) | |
tree | a871b816498d04bbd1e01015176da7cd3265b4ea /p2p/src | |
parent | 6acf69b6527f5b156c884ece8f3883a89cd67010 (diff) |
p2p/message: minor change to get_msg_payload macro
Diffstat (limited to 'p2p/src')
-rw-r--r-- | p2p/src/message.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/p2p/src/message.rs b/p2p/src/message.rs index 833f6f4..cdb9837 100644 --- a/p2p/src/message.rs +++ b/p2p/src/message.rs @@ -99,11 +99,14 @@ pub struct PeerMsg { pub struct PeersMsg(pub Vec<PeerMsg>); macro_rules! get_msg_payload { - ($a:ident, $b:expr) => { + ($a:ident, $b:ident) => { if let NetMsgCmd::$a = $b.header.command { $b.payload } else { - return Err(Error::InvalidMsg(format!("Unexpected msg{:?}", $b))); + return Err(Error::InvalidMsg(format!( + "Unexpected msg {:?}", + $b.header.command + ))); } }; } |