INNER CODE UNIT · Rust
set_len
binius-zk/binius64 · crates/compute/src/lib.rs:198
unsafe fn set_len(&mut self, new_len: usize) {
unsafe { PoolVec::set_len(self, new_len) }
}
}
impl<'alloc> Allocator for &'alloc BufferPool {
type Vec<T: Send> = PoolVec<'alloc, T>;
fn alloc<T: Send>(&self, capacity: usize) -> Self::Vec<T> {
// Copy the `&'alloc BufferPool` out of `&self` so the returned `PoolVec` borrows the pool
// for `'alloc`, not merely for this call's `&self` borrow.
let pool: &'alloc BufferPool = self;
pool.alloc_vec(capacity)
}
}
impl<T> VecLike<T> for Vec<T> {
fn capacity(&self) -> usize {