You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asyncband.apache.org by ti...@apache.org on 2026/10/03 06:36:49 UTC

(asyncband) 03/22: refactor(internal): gate Arena::len to test builds

This is an automated email from the ASF dual-hosted git repository.

tisonkun pushed a commit to branch tison/deslopify
in repository https://gitbox.apache.org/repos/asf/asyncband.git

commit 04e063f484507a504d532d3d589c0043d2c60208
Author: tison <wa...@gmail.com>
AuthorDate: Sat Oct 3 14:17:24 2026 +0800

    refactor(internal): gate Arena::len to test builds
    
    Its only callers are WaitList::occupied_len, which is itself #[cfg(test)],
    and the arena unit tests. Production code observes occupancy through
    is_empty, which stays available in all builds.
---
 asyncband/src/internal/arena.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/asyncband/src/internal/arena.rs b/asyncband/src/internal/arena.rs
index 6975af5..68a6b4e 100644
--- a/asyncband/src/internal/arena.rs
+++ b/asyncband/src/internal/arena.rs
@@ -121,6 +121,7 @@ impl<T> Arena<T> {
         }
     }
 
+    #[cfg(test)]
     pub fn len(&self) -> usize {
         self.len
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@asyncband.apache.org
For additional commands, e-mail: commits-help@asyncband.apache.org