shared_vec/impls/
borrow.rs

1use crate::{Counter, String, Vec};
2use core::borrow::Borrow;
3
4impl<C: Counter<usize>> Borrow<str> for String<C> {
5    #[inline]
6    fn borrow(&self) -> &str {
7        self
8    }
9}
10impl<C: Counter<usize>, T> Borrow<[T]> for Vec<C, T> {
11    #[inline]
12    fn borrow(&self) -> &[T] {
13        self
14    }
15}