Skip to content

Commit f16c79e

Browse files
committed
Pool::allocate is not unsafe
1 parent c897175 commit f16c79e

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/core/pool.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,6 @@ impl Pool {
135135
/// Allocates memory for a value of a specified type and adds a cleanup handler to the memory pool.
136136
///
137137
/// Returns a typed pointer to the allocated memory if successful, or a null pointer if allocation or cleanup handler addition fails.
138-
///
139-
/// # Safety
140-
/// This function is marked as unsafe because it involves raw pointer manipulation.
141138
pub fn allocate<T>(&mut self, value: T) -> *mut T {
142139
unsafe {
143140
let p = self.alloc(mem::size_of::<T>()) as *mut T;

0 commit comments

Comments
 (0)