From 66c018c69848dc2462e44597ca4bf94abedafe33 Mon Sep 17 00:00:00 2001 From: Claude Bot Date: Wed, 30 Jul 2025 21:21:41 +0000 Subject: [PATCH] docs: Remove subjective claims from zero() method documentation Focus on what the function does rather than why it should be used. Remove context-dependent claims about efficiency, security, and use cases. --- src/collections/multi_array_list.zig | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/collections/multi_array_list.zig b/src/collections/multi_array_list.zig index c8bbca857e..edd9551354 100644 --- a/src/collections/multi_array_list.zig +++ b/src/collections/multi_array_list.zig @@ -605,17 +605,9 @@ pub fn MultiArrayList(comptime T: type) type { /// Zero-initialize all allocated memory in the MultiArrayList. /// - /// This method efficiently clears the entire backing buffer by setting all bytes to zero, - /// which zero-initializes all fields across all elements in the list. This is more - /// efficient than iterating through individual elements or fields. - /// - /// Use cases: - /// - Security: Clear sensitive data from memory - /// - Deterministic behavior: Ensure uninitialized memory doesn't contain garbage - /// - Testing: Create predictable initial states - /// - /// Note: This operation affects the entire allocated capacity, not just the current length. - /// All reserved but unused capacity will also be zeroed. + /// Sets all bytes in the backing buffer to zero, which zero-initializes all fields + /// across all elements in the list. This operation affects the entire allocated + /// capacity, not just the current length. pub fn zero(self: Self) void { @memset(self.allocatedBytes(), 0); }