2 ms·
FWIW that Rust code can drop the last instance of `'a` since it can be inferred: fn type_list<'a>(dex: &'a DexFile<'a>, off: u32, parse_cls_desc: bool) -
by eridius 10y ago
FWIW that Rust code can drop the last instance of `'a` since it can be inferred:
fn type_list<'a>(dex: &'a DexFile<'a>,
off: u32, parse_cls_desc: bool) -> Vec<&bstr> {
In fact, the only reason you need to write 'a anywhere there is to tell the compiler that the & reference and the lifetime parameter to DexFile are the same. If either of those two lifetimes didn't exist (e.g. if DexFile didn't take a lifetime) you could drop them entirely:
fn type_list(dex: &DexFile,
off: u32, parse_cls_desc: bool) -> Vec<&bstr> {