Skip to content

Commit

Permalink
fix(ops): use qualified borrow in op macro (denoland#15769)
Browse files Browse the repository at this point in the history
Fix denoland#15764

Use RefCell::borrow instead of state.borrow to avoid clash with std::borrow::Borrow
  • Loading branch information
sigmaSd authored Sep 5, 2022
1 parent 50fc5d1 commit b0a671d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ops/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,8 @@ fn codegen_v8_sync(

let result = Self::call::<#type_params>(#args_head #args_tail);

let op_state = &*ctx.state.borrow();
// use RefCell::borrow instead of state.borrow to avoid clash with std::borrow::Borrow
let op_state = ::std::cell::RefCell::borrow(&*ctx.state);
op_state.tracker.track_sync(ctx.id);

#ret
Expand Down

0 comments on commit b0a671d

Please sign in to comment.