Fix a warning that I reintroduced.

It looks like this got fixed, but my branch for !759 reintroduced it
by refactoring.
This commit is contained in:
Nick Mathewson 2022-10-11 09:38:04 -04:00
parent 34c689cbe8
commit 0cb7b030b3
1 changed files with 1 additions and 0 deletions

View File

@ -184,6 +184,7 @@ pub trait CircTarget: ChanTarget {
// doing so correctly would require default associated types.
fn linkspecs(&self) -> Vec<crate::LinkSpec> {
let mut result: Vec<_> = self.identities().map(|id| id.to_owned().into()).collect();
#[allow(irrefutable_let_patterns)]
if let ChannelMethod::Direct(addrs) = self.chan_method() {
result.extend(addrs.into_iter().map(crate::LinkSpec::from));
}