use alloc::vec;
use super::Scratch;
use super::span::to_index;
use super::storage::{Storage, clamp_capacity};
impl Scratch<'static> {
#[must_use]
pub fn growable(initial: usize) -> Scratch<'static> {
let initial = to_index(clamp_capacity(initial));
Scratch {
storage: Storage::Owned(vec![0.0; initial]),
used: 0,
high_water: 0,
}
}
}