From 32126f20891670e860f46b009495226b0a4bc95b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 7 Oct 2022 16:34:17 +0100 Subject: [PATCH] Allow two useless pattern matches that are going to be not useless --- crates/tor-chanmgr/src/builder.rs | 1 + crates/tor-linkspec/src/traits.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/crates/tor-chanmgr/src/builder.rs b/crates/tor-chanmgr/src/builder.rs index f97d57499..a71e69b6b 100644 --- a/crates/tor-chanmgr/src/builder.rs +++ b/crates/tor-chanmgr/src/builder.rs @@ -153,6 +153,7 @@ impl ChanBuilder { .iter() .filter_map(|method| match method { ChannelMethod::Direct(addr) => Some(*addr), + #[allow(unreachable_patterns)] // TODO pt-client _ => None, }) .collect(); diff --git a/crates/tor-linkspec/src/traits.rs b/crates/tor-linkspec/src/traits.rs index a042c0ed7..0bbbdb195 100644 --- a/crates/tor-linkspec/src/traits.rs +++ b/crates/tor-linkspec/src/traits.rs @@ -188,6 +188,7 @@ pub trait CircTarget: ChanTarget { fn linkspecs(&self) -> Vec { let mut result: Vec<_> = self.identities().map(|id| id.to_owned().into()).collect(); for method in self.chan_methods().iter() { + #[allow(irrefutable_let_patterns)] // TODO pt-client if let ChannelMethod::Direct(addr) = method { result.push(addr.into()); }