From 551dcdf8f8f0399eb49ecdd8349dd03018bc0e3b Mon Sep 17 00:00:00 2001 From: David Renshaw Date: Tue, 20 Sep 2022 15:32:59 -0400 Subject: [PATCH] add some comments on allocate_segment() methods --- capnp/src/private/arena.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/capnp/src/private/arena.rs b/capnp/src/private/arena.rs index 4427d2f5f..f83c4acd6 100644 --- a/capnp/src/private/arena.rs +++ b/capnp/src/private/arena.rs @@ -174,6 +174,7 @@ impl BuilderArenaImpl where A: Allocator { } } + /// Allocates a new segment with capacity for at least `minimum_size` words. pub fn allocate_segment(&self, minimum_size: u32) -> Result<()> { self.inner.borrow_mut().allocate_segment(minimum_size) } @@ -233,6 +234,7 @@ impl ReaderArena for BuilderArenaImpl where A: Allocator { } impl BuilderArenaImplInner where A: Allocator { + /// Allocates a new segment with capacity for at least `minimum_size` words. fn allocate_segment(&mut self, minimum_size: WordCount32) -> Result<()> { let seg = match self.allocator { Some(ref mut a) => a.allocate_segment(minimum_size),