1
0
Fork 0
mirror of https://forgejo.ellis.link/continuwuation/continuwuity.git synced 2025-08-01 20:58:31 +00:00
continuwuity/src/core/utils/arrayvec.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
373 B
Rust
Raw Normal View History

use ::arrayvec::ArrayVec;
pub trait ArrayVecExt<T> {
fn extend_from_slice(&mut self, other: &[T]) -> &mut Self;
}
impl<T: Copy, const CAP: usize> ArrayVecExt<T> for ArrayVec<T, CAP> {
#[inline]
fn extend_from_slice(&mut self, other: &[T]) -> &mut Self {
self.try_extend_from_slice(other)
.expect("Insufficient buffer capacity to extend from slice");
self
}
}