Onion3Addr::acquire: fix bug due to differing lifetimes (#1468)

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
This commit is contained in:
Mazdak Farrokhzad
2020-02-24 18:42:43 +01:00
committed by GitHub
parent 4472840acf
commit 4496337f93

View File

@ -20,7 +20,7 @@ impl<'a> Onion3Addr<'a> {
/// Consume this instance and create an owned version containing the same address /// Consume this instance and create an owned version containing the same address
pub fn acquire<'b>(self) -> Onion3Addr<'b> { pub fn acquire<'b>(self) -> Onion3Addr<'b> {
Self(Cow::Owned(self.0.into_owned()), self.1) Onion3Addr(Cow::Owned(self.0.into_owned()), self.1)
} }
} }