use crate::prelude::StDenseStoRef;

/// Static Indexed Storage - Mutable
pub trait StDenseStoMut: StDenseStoRef {
    fn as_mut_slice(&mut self) -> &mut [Self::Item];
}

#[cfg(feature = "std")]
impl<T> StDenseStoMut for Vec<T> {
    fn as_mut_slice(&mut self) -> &mut [Self::Item] {
        &mut self[..]
    }
}

impl<'a, T> StDenseStoMut for &'a mut [T] {
    fn as_mut_slice(&mut self) -> &mut [T] {
        self
    }
}
