From 78b7fc6abbd8f610da906ca6a0e0c25c2044f499 Mon Sep 17 00:00:00 2001 From: David Renshaw Date: Mon, 16 Sep 2024 14:36:47 -0400 Subject: [PATCH] fix no-alloc build --- capnp/src/private/arena.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/capnp/src/private/arena.rs b/capnp/src/private/arena.rs index a6d3cf8e6..6854b8cc3 100644 --- a/capnp/src/private/arena.rs +++ b/capnp/src/private/arena.rs @@ -348,8 +348,8 @@ where fn size_in_words(&self) -> usize { let mut result = 0; - for seg in &self.inner.segments { - result += seg.allocated as usize + for ii in 0 .. self.inner.segments.len() { + result += self.inner.segments[ii].allocated as usize } result }