From f0729022589ee8e48b5558ab30462f95d06fe6df Mon Sep 17 00:00:00 2001 From: hozan23 Date: Mon, 13 Nov 2023 15:03:15 +0300 Subject: p2p/message: minor change to get_msg_payload macro --- p2p/src/message.rs | 7 +++++-- 1 file 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); 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 + ))); } }; } -- cgit v1.2.3