Skip to content

Commit 6411891

Browse files
DCNick3mversic
authored andcommitted
[feature] #3383: Make clippy and rustfmt happy (thanks, I hate it)
`rustfmt` wants `socket_addr!(127.0.0.1: port);` to be formatted as `socket_addr!(127.0.0 .1: port);`... There is an option to exclude a certain macro invocations from being formatted, but 1) the config option parsing seems broken rust-lang/rustfmt#5816 2) the toolchain used in CI doesn't support it I guess we would have to live with this ugly formatting for some time... Signed-off-by: Nikita Strygin <[email protected]>
1 parent 1334a0d commit 6411891

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

core/test_network/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -595,9 +595,9 @@ impl PeerBuilder {
595595
pub fn build(&mut self) -> Result<Peer> {
596596
let mut peer = Peer::new()?;
597597
if let Some(port) = self.port.take() {
598-
peer.p2p_address = socket_addr!(127.0.0.1: port);
599-
peer.api_address = socket_addr!(127.0.0.1: port + 1);
600-
peer.telemetry_address = socket_addr!(127.0.0.1: port + 2);
598+
peer.p2p_address = socket_addr!(127.0.0 .1: port);
599+
peer.api_address = socket_addr!(127.0.0 .1: port + 1);
600+
peer.telemetry_address = socket_addr!(127.0.0 .1: port + 2);
601601
// prevent field desync
602602
peer.id.address = peer.p2p_address.clone();
603603
}

primitives/derive/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Crate containing procedural macros for `iroha_primitives`.
2+
13
mod socket_addr;
24

35
/// Convenience macro to concisely construct a `SocketAddr`

0 commit comments

Comments
 (0)