add List::as_slice

This commit is contained in:
lcnr 2022-08-17 11:22:47 +02:00
parent 86c6ebee8f
commit b7a8496a07

View File

@ -65,6 +65,10 @@ impl<T> List<T> {
pub fn len(&self) -> usize {
self.len
}
pub fn as_slice(&self) -> &[T] {
self
}
}
impl<T: Copy> List<T> {