From 155b9ed581c4a550439a2a2977c189bea9a55278 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 1 Feb 2023 15:43:10 +0000 Subject: [PATCH 1/2] Change two in-code references to the wrong feature name As per https://gitlab.torproject.org/tpo/core/arti/-/issues/756 I think this is going in the wrong direction, but it is better to fix it so that the names agree for now, pending a decision on the naming. --- crates/tor-netdir/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/tor-netdir/src/lib.rs b/crates/tor-netdir/src/lib.rs index 9244b0357..0cb66e5c2 100644 --- a/crates/tor-netdir/src/lib.rs +++ b/crates/tor-netdir/src/lib.rs @@ -606,7 +606,7 @@ impl PartialNetDir { } } - #[cfg(feature = "hs-common")] + #[cfg(feature = "onion-common")] { // TODO hs: cache the values for the hash rings if possible, maybe // in the PartialNetDir, since we will want to use them in computing @@ -619,7 +619,7 @@ impl PartialNetDir { } /// Compute the hash ring(s) for this NetDir, if one is not already computed. - #[cfg(feature = "hs-common")] + #[cfg(feature = "onion-common")] #[allow(clippy::missing_panics_doc)] pub fn compute_ring(&mut self) { // TODO hs: compute the ring based on the time period and shared random From 5bca38acc59b8a14442bbacb16ef295009544e2d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 31 Jan 2023 16:17:29 +0000 Subject: [PATCH 2/2] tor-netdoc: Suppress a cfg-dependent dead code warning This is dead code when cargo +stable clippy -p tor-netdir --all-features --all-targets --- crates/tor-netdoc/src/parse/tokenize.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/tor-netdoc/src/parse/tokenize.rs b/crates/tor-netdoc/src/parse/tokenize.rs index f421eaab9..d885942dd 100644 --- a/crates/tor-netdoc/src/parse/tokenize.rs +++ b/crates/tor-netdoc/src/parse/tokenize.rs @@ -22,6 +22,7 @@ pub(crate) mod object { /// indicates the end of a begin or end tag. pub(crate) const TAG_END: &str = "-----"; /// Maximum PEM base64 line length (not enforced during parsing) + #[cfg(feature = "onion-service")] pub(crate) const BASE64_PEM_MAX_LINE: usize = 64; }