Reduce the number of calls to cdata
This commit is contained in:
parent
04b3ab67d9
commit
748e71e8f4
1 changed files with 2 additions and 2 deletions
|
|
@ -185,8 +185,8 @@ impl<'a, 'tcx> DecodeContext<'a, 'tcx> {
|
|||
if let Some(index) = self.interpret_alloc_index.as_mut() {
|
||||
return index[idx] as usize;
|
||||
}
|
||||
let index = self.cdata().root.interpret_alloc_index;
|
||||
let index: Vec<u32> = index.decode(self.cdata()).collect();
|
||||
let cdata = self.cdata();
|
||||
let index: Vec<u32> = cdata.root.interpret_alloc_index.decode(cdata).collect();
|
||||
let pos = index[idx];
|
||||
self.interpret_alloc_index = Some(index);
|
||||
pos as usize
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue