Fix impossible lifetime bounds

Using Routes<'static> used to make these functions impossible because it created a reference that needed to be valid for the static lifetime

Closes: #243
Approved by: dlrobertson
This commit is contained in:
jD91mZM2 2018-06-19 08:28:49 +02:00 committed by Homu
parent eb078ecf63
commit 3d141489a2
1 changed files with 2 additions and 2 deletions

View File

@ -281,11 +281,11 @@ impl<'b, 'c, 'e, DeviceT> Interface<'b, 'c, 'e, DeviceT>
self.inner.has_ip_addr(addr)
}
pub fn routes(&self) -> &'e Routes {
pub fn routes(&self) -> &Routes<'e> {
&self.inner.routes
}
pub fn routes_mut(&mut self) -> &'e mut Routes {
pub fn routes_mut(&mut self) -> &mut Routes<'e> {
&mut self.inner.routes
}