1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
use std::collections::VecDeque;
use crate::{
	Collection,
	WithCapacity,
	Len,
	Capacity,
	Reserve,
	Back,
	BackMut,
	Front,
	FrontMut,
	PushBack,
	PopBack,
	Clear
};

impl<T> Collection for VecDeque<T> {
	type Item = T;
}

impl<T> WithCapacity for VecDeque<T> {
	#[inline(always)]
	fn with_capacity(capacity: usize) -> Self {
		VecDeque::with_capacity(capacity)
	}
}

impl<T> Len for VecDeque<T> {
	#[inline(always)]
	fn len(&self) -> usize {
		self.len()
	}

	#[inline(always)]
	fn is_empty(&self) -> bool {
		self.is_empty()
	}
}

impl<T> Capacity for VecDeque<T> {
	fn capacity(&self) -> usize {
		self.capacity()
	}
}

impl<T> Reserve for VecDeque<T> {
	fn reserve(&mut self, additional: usize) {
		self.reserve(additional)
	}
}

impl<T> Back for VecDeque<T> {
	fn back(&self) -> Option<&T> {
		self.back()
	}
}

impl<T> BackMut for VecDeque<T> {
	fn back_mut(&mut self) -> Option<&mut T> {
		self.back_mut()
	}
}

impl<T> Front for VecDeque<T> {
	fn front(&self) -> Option<&T> {
		self.front()
	}
}

impl<T> FrontMut for VecDeque<T> {
	fn front_mut(&mut self) -> Option<&mut T> {
		self.front_mut()
	}
}

impl<T> PushBack for VecDeque<T> {
	type Output = ();

	fn push_back(&mut self, t: T) {
		self.push_back(t)
	}
}

impl<T> PopBack for VecDeque<T> {
	fn pop_back(&mut self) -> Option<T> {
		self.pop_back()
	}
}

impl<T> Clear for VecDeque<T> {
	fn clear(&mut self) {
		self.clear()
	}
}