diff options
author | sigmaSd <bedisnbiba@gmail.com> | 2022-09-05 02:59:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-05 07:29:36 +0530 |
commit | b0a671df8e2796a30fea4fab06018abee738c8ac (patch) | |
tree | e9c28878725a83f8f505976610139821e7e65fcc | |
parent | 50fc5d169aec43b4cc0c4ff08a8073bca99c18f4 (diff) |
fix(ops): use qualified borrow in op macro (#15769)
Fix https://github.com/denoland/deno/issues/15764
Use RefCell::borrow instead of state.borrow to avoid clash with std::borrow::Borrow
-rw-r--r-- | ops/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ops/lib.rs b/ops/lib.rs index 437fa3b7e..f75972c51 100644 --- a/ops/lib.rs +++ b/ops/lib.rs @@ -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 |