Allow two useless pattern matches that are going to be not useless

This commit is contained in:
Ian Jackson 2022-10-07 16:34:17 +01:00
parent 19d33d207d
commit 32126f2089
2 changed files with 2 additions and 0 deletions

View File

@ -153,6 +153,7 @@ impl<R: Runtime> ChanBuilder<R> {
.iter()
.filter_map(|method| match method {
ChannelMethod::Direct(addr) => Some(*addr),
#[allow(unreachable_patterns)] // TODO pt-client
_ => None,
})
.collect();

View File

@ -188,6 +188,7 @@ pub trait CircTarget: ChanTarget {
fn linkspecs(&self) -> Vec<crate::LinkSpec> {
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());
}