diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2021-10-24 19:30:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-24 19:30:55 +0200 |
commit | 439a2914dbdd0b71a4af06cde402d80653d71d04 (patch) | |
tree | e9f55fd82ae1bf829b5f3088f48bdc1e2fe95b5d /core/ops.rs | |
parent | 834f474729875135c8445e38b76fb750b223caa9 (diff) |
fix(core): avoid op_state.borrow_mut() for OpsTracker (#12525)
By allowing interior mutability in OpsTracker (owning a RefCell<Vec> instead of just a Vec)
Fixes #12453
Diffstat (limited to 'core/ops.rs')
-rw-r--r-- | core/ops.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/ops.rs b/core/ops.rs index 05b91f32f..20b14ec39 100644 --- a/core/ops.rs +++ b/core/ops.rs @@ -172,7 +172,7 @@ impl OpState { op_table: OpTable::default(), get_error_class_fn: &|_| "Error", tracker: OpsTracker { - ops: Vec::with_capacity(256), + ops: RefCell::new(Vec::with_capacity(256)), }, gotham_state: Default::default(), } |