loosen lifetimes in type signature of Table::get (#4925)

This commit is contained in:
kzvi
2018-09-27 20:56:49 -07:00
committed by Robert
parent 0bffce5aef
commit a89be8739c
2 changed files with 33 additions and 2 deletions

View File

@@ -30,12 +30,12 @@ impl<'a> Table<'a> {
Table { buf: buf, loc: loc }
}
#[inline]
pub fn vtable(&'a self) -> VTable<'a> {
pub fn vtable(&self) -> VTable<'a> {
<BackwardsSOffset<VTable<'a>>>::follow(self.buf, self.loc)
}
#[inline]
pub fn get<T: Follow<'a> + 'a>(
&'a self,
&self,
slot_byte_loc: VOffsetT,
default: Option<T::Inner>,
) -> Option<T::Inner> {