1 2 3 4 5 6 7 8 9 10 11 12
#[const_trait] pub trait Nill { #[must_use] fn nil(&self) -> bool; } impl<T> const Nill for Vec<T> { #[inline] fn nil(&self) -> bool { self.len() == 0 } }