From 7003d9de96824f3e1cb67d56c1c4be883f6e2520 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 21 Sep 2026 23:42:32 +0200 Subject: refactor(engine-ecs): fix clippy lints --- engine-ecs/src/util/array_vec.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'engine-ecs/src/util') diff --git a/engine-ecs/src/util/array_vec.rs b/engine-ecs/src/util/array_vec.rs index 3e3344c..bfcc158 100644 --- a/engine-ecs/src/util/array_vec.rs +++ b/engine-ecs/src/util/array_vec.rs @@ -24,6 +24,8 @@ impl ArrayVec self.len == 0 } + /// # Panics + /// This function will panic if no more space is available. pub fn push(&mut self, item: Item) { assert!(self.len < CAPACITY); @@ -33,6 +35,9 @@ impl ArrayVec self.len += 1; } + /// # Panics + /// This function will panic if the index is out of bounds or if no more space is + /// available. pub fn insert(&mut self, index: usize, item: Item) { assert!(index <= self.len); -- cgit v1.2.3-18-g5258