/// Add an element last in the list
///
/// O(1)
+ #[deprecated = "use the `push` method"]
fn push_back(&mut self, elt: T) {
self.push_back_node(box Node::new(elt))
}
/// Remove the last element and return it, or None if the list is empty
///
/// O(1)
+ #[deprecated = "use the `pop` method"]
fn pop_back(&mut self) -> Option<T> {
self.pop_back_node().map(|box Node{value, ..}| value)
}
/// d.push_back(2i);
/// assert_eq!(d.front(), Some(&1i));
/// ```
+ #[deprecated = "use the `push` method"]
fn push_back(&mut self, elt: T);
/// Remove the last element and return it, or `None` if the sequence is empty.
/// assert_eq!(d.pop_back(), Some(1i));
/// assert_eq!(d.pop_back(), None);
/// ```
+ #[deprecated = "use the `pop` method"]
fn pop_back(&mut self) -> Option<T>;
/// Remove the first element and return it, or `None` if the sequence is empty.
}
/// Remove and return the last element in the RingBuf, or None if it is empty
+ #[deprecated = "use the `pop` method"]
fn pop_back(&mut self) -> Option<T> {
if self.nelts > 0 {
self.nelts -= 1;
}
/// Append an element to the RingBuf
+ #[deprecated = "use the `push` method"]
fn push_back(&mut self, t: T) {
if self.nelts == self.elts.len() {
grow(self.nelts, &mut self.lo, &mut self.elts);