blob: 4c56b146772d81df531f509ca621029a1358fb95 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
use extend::ext;
#[ext]
impl<'a, T: Clone> Vec<&'a T>
where
T: 'a + Copy,
{
fn size(&self) -> usize {
self.len()
}
}
fn main() {
assert_eq!(3, vec![&1, &2, &3].size());
}
|