summaryrefslogtreecommitdiff
path: root/core/ops_metrics.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-04-26 20:02:27 +0200
committerGitHub <noreply@github.com>2023-04-26 20:02:27 +0200
commit77e25a656eca0cb1639ae39c515ac6c5f86d2ac9 (patch)
tree7a72f0ba696c3ac5171593034b765eecdb9b5f20 /core/ops_metrics.rs
parent14aaa73c0200d7fac4aa224d623e28b5955daab9 (diff)
refactor(core): simplify op types and codegeneration (#18843)
About 2% improvement on WS/HTTP benchmarks, possibly unlocking more optimizations in the future. --------- Co-authored-by: Matt Mastracci <matthew@mastracci.com>
Diffstat (limited to 'core/ops_metrics.rs')
-rw-r--r--core/ops_metrics.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/ops_metrics.rs b/core/ops_metrics.rs
index c0b8abb51..b25368bd0 100644
--- a/core/ops_metrics.rs
+++ b/core/ops_metrics.rs
@@ -63,7 +63,7 @@ impl OpsTracker {
#[inline]
fn metrics_mut(&self, id: OpId) -> RefMut<OpMetrics> {
- RefMut::map(self.ops.borrow_mut(), |ops| &mut ops[id])
+ RefMut::map(self.ops.borrow_mut(), |ops| &mut ops[id as usize])
}
#[inline]