From 536668f9934f03bd82180ce648e8cd145f2e377a Mon Sep 17 00:00:00 2001 From: teor Date: Wed, 29 Jul 2020 11:27:36 +1000 Subject: [PATCH] fix: allow(dead_code) on some protocol version functions --- zebra-network/src/protocol/external/codec.rs | 2 ++ zebra-network/src/protocol/external/types.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/zebra-network/src/protocol/external/codec.rs b/zebra-network/src/protocol/external/codec.rs index 8da8e810..65f10f87 100644 --- a/zebra-network/src/protocol/external/codec.rs +++ b/zebra-network/src/protocol/external/codec.rs @@ -79,12 +79,14 @@ impl Builder { } /// Configure the codec for the given [`Version`]. + #[allow(dead_code)] pub fn for_version(mut self, version: Version) -> Self { self.version = version; self } /// Configure the codec's maximum accepted payload size, in bytes. + #[allow(dead_code)] pub fn with_max_body_len(mut self, len: usize) -> Self { self.max_len = len; self diff --git a/zebra-network/src/protocol/external/types.rs b/zebra-network/src/protocol/external/types.rs index 06b5380c..2c466928 100644 --- a/zebra-network/src/protocol/external/types.rs +++ b/zebra-network/src/protocol/external/types.rs @@ -59,6 +59,7 @@ impl Version { /// Returns the current minimum protocol version for `network` and `height`. /// /// Returns None if the network has no branch id at this height. + #[allow(dead_code)] pub fn current_min(network: Network, height: BlockHeight) -> Version { let network_upgrade = NetworkUpgrade::current(network, height); Version::min_for_upgrade(network, network_upgrade)