diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2022-03-08 09:28:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-08 09:28:20 +0100 |
commit | 303d691a169e61a0ab38be48cdd2387c7573ed08 (patch) | |
tree | 2417ef559d39a6c48b9a8fc94f18471c916d1238 /core/ops.rs | |
parent | 566a1493f53a8aed1fd9315f1bdaf541d7dc63bd (diff) |
perf(core): micro-optimize OpsTracker (#13868)
Diffstat (limited to 'core/ops.rs')
-rw-r--r-- | core/ops.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/ops.rs b/core/ops.rs index fbdb96fcd..50197c9be 100644 --- a/core/ops.rs +++ b/core/ops.rs @@ -16,6 +16,7 @@ use indexmap::IndexMap; use serde::de::DeserializeOwned; use serde::Serialize; use std::cell::RefCell; +use std::cell::UnsafeCell; use std::iter::once; use std::ops::Deref; use std::ops::DerefMut; @@ -170,7 +171,7 @@ impl OpState { op_table: OpTable::default(), get_error_class_fn: &|_| "Error", tracker: OpsTracker { - ops: RefCell::new(Vec::with_capacity(256)), + ops: UnsafeCell::new(Vec::with_capacity(256)), }, gotham_state: Default::default(), } |