Skip to content

Commit f6b6986

Browse files
committed
remove unnecessary buffer operations
1 parent f4219cf commit f6b6986

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

library/proc_macro/src/bridge/client.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,6 @@ fn run_client<A: for<'a, 's> Decode<'a, 's, ()>, R: Encode<()>>(
294294

295295
let output = state::set(&state, || f(input));
296296

297-
// Take the `cached_buffer` back out, for the output value.
298-
buf = RefCell::into_inner(state).cached_buffer;
299-
300297
// HACK(eddyb) Separate encoding a success value (`Ok(output)`)
301298
// from encoding a panic (`Err(e: PanicMessage)`) to avoid
302299
// having handles outside the `bridge.enter(|| ...)` scope, and
@@ -306,7 +303,6 @@ fn run_client<A: for<'a, 's> Decode<'a, 's, ()>, R: Encode<()>>(
306303
// this is defensively trying to avoid any accidental panicking
307304
// reaching the `extern "C"` (which should `abort` but might not
308305
// at the moment, so this is also potentially preventing UB).
309-
buf.clear();
310306
Ok::<_, ()>(output).encode(&mut buf, &mut ());
311307
}))
312308
.map_err(PanicMessage::from)

0 commit comments

Comments
 (0)