Skip to content

Commit

Permalink
Fix impossible lifetime bounds
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jD91mZM2 authored and Homu committed Jun 19, 2018
1 parent bf24933 commit d23aee4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/iface/ethernet.rs
Expand Up @@ -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
}

Expand Down

0 comments on commit d23aee4

Please sign in to comment.