We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11dd90f commit 1486ae4Copy full SHA for 1486ae4
compiler/rustc_middle/src/mir/interpret/mod.rs
@@ -222,9 +222,8 @@ impl<'s> AllocDecodingSession<'s> {
222
223
// Check the decoding state to see if it's already decoded or if we should
224
// decode it here.
225
+ let mut entry = self.state.decoding_state[idx].lock();
226
let alloc_id = {
- let mut entry = self.state.decoding_state[idx].lock();
227
-
228
match *entry {
229
State::Done(alloc_id) => {
230
return alloc_id;
@@ -317,9 +316,7 @@ impl<'s> AllocDecodingSession<'s> {
317
316
}
318
});
319
320
- self.state.decoding_state[idx].with_lock(|entry| {
321
- *entry = State::Done(alloc_id);
322
- });
+ *entry = State::Done(alloc_id);
323
324
alloc_id
325
0 commit comments