Skip to content

Commit 748e71e

Browse files
committed
Reduce the number of calls to cdata
1 parent 04b3ab6 commit 748e71e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc_metadata/decoder.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ impl<'a, 'tcx> DecodeContext<'a, 'tcx> {
185185
if let Some(index) = self.interpret_alloc_index.as_mut() {
186186
return index[idx] as usize;
187187
}
188-
let index = self.cdata().root.interpret_alloc_index;
189-
let index: Vec<u32> = index.decode(self.cdata()).collect();
188+
let cdata = self.cdata();
189+
let index: Vec<u32> = cdata.root.interpret_alloc_index.decode(cdata).collect();
190190
let pos = index[idx];
191191
self.interpret_alloc_index = Some(index);
192192
pos as usize

0 commit comments

Comments
 (0)