Skip to content

Commit

Permalink
Just land already
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed Jul 23, 2014
1 parent 27e70c5 commit 71a75cc
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 44 deletions.
46 changes: 23 additions & 23 deletions src/libcollections/dlist.rs
Expand Up @@ -279,12 +279,12 @@ impl<T> DList<T> {
/// # Example
///
/// ```rust
/// use std::collections::{DList, Deque};
/// use std::collections::DList;
///
/// let mut dl = DList::new();
/// dl.push_back(1i);
/// dl.push_back(2);
/// dl.push_back(3);
/// dl.push(1i);
/// dl.push(2);
/// dl.push(3);
///
/// dl.rotate_forward();
///
Expand All @@ -306,12 +306,12 @@ impl<T> DList<T> {
/// # Example
///
/// ```rust
/// use std::collections::{DList, Deque};
/// use std::collections::DList;
///
/// let mut dl = DList::new();
/// dl.push_back(1i);
/// dl.push_back(2);
/// dl.push_back(3);
/// dl.push(1i);
/// dl.push(2);
/// dl.push(3);
///
/// dl.rotate_backward();
///
Expand All @@ -333,14 +333,14 @@ impl<T> DList<T> {
/// # Example
///
/// ```rust
/// use std::collections::{DList, Deque};
/// use std::collections::DList;
///
/// let mut a = DList::new();
/// let mut b = DList::new();
/// a.push_back(1i);
/// a.push_back(2);
/// b.push_back(3i);
/// b.push_back(4);
/// a.push(1i);
/// a.push(2);
/// b.push(3i);
/// b.push(4);
///
/// a.append(b);
///
Expand Down Expand Up @@ -374,14 +374,14 @@ impl<T> DList<T> {
/// # Example
///
/// ```rust
/// use std::collections::{DList, Deque};
/// use std::collections::DList;
///
/// let mut a = DList::new();
/// let mut b = DList::new();
/// a.push_back(1i);
/// a.push_back(2);
/// b.push_back(3i);
/// b.push_back(4);
/// a.push(1i);
/// a.push(2);
/// b.push(3i);
/// b.push(4);
///
/// a.prepend(b);
///
Expand All @@ -403,13 +403,13 @@ impl<T> DList<T> {
/// # Example
///
/// ```rust
/// use std::collections::{DList, Deque};
/// use std::collections::DList;
///
/// let mut a: DList<int> = DList::new();
/// a.push_back(2i);
/// a.push_back(4);
/// a.push_back(7);
/// a.push_back(8);
/// a.push(2i);
/// a.push(4);
/// a.push(7);
/// a.push(8);
///
/// // insert 11 before the first odd number in the list
/// a.insert_when(11, |&e, _| e % 2 == 1);
Expand Down
36 changes: 18 additions & 18 deletions src/libcollections/lib.rs
Expand Up @@ -360,9 +360,9 @@ pub trait MutableSeq<T>: Mutable {
/// use std::collections::{RingBuf, Deque};
///
/// let mut queue = RingBuf::new();
/// queue.push_back(1i);
/// queue.push_back(2i);
/// queue.push_back(3i);
/// queue.push(1i);
/// queue.push(2i);
/// queue.push(3i);
///
/// // Will print 1, 2, 3
/// while !queue.is_empty() {
Expand Down Expand Up @@ -398,13 +398,13 @@ pub trait MutableSeq<T>: Mutable {
/// // Init deque with 1, 2, 3, 4
/// deque.push_front(2i);
/// deque.push_front(1i);
/// deque.push_back(3i);
/// deque.push_back(4i);
/// deque.push(3i);
/// deque.push(4i);
///
/// // Will print (1, 4) and (2, 3)
/// while !deque.is_empty() {
/// let f = deque.pop_front().unwrap();
/// let b = deque.pop_back().unwrap();
/// let b = deque.pop().unwrap();
/// println!("{}", (f, b));
/// }
/// ```
Expand All @@ -420,8 +420,8 @@ pub trait Deque<T> : MutableSeq<T> {
/// let mut d = RingBuf::new();
/// assert_eq!(d.front(), None);
///
/// d.push_back(1i);
/// d.push_back(2i);
/// d.push(1i);
/// d.push(2i);
/// assert_eq!(d.front(), Some(&1i));
/// ```
fn front<'a>(&'a self) -> Option<&'a T>;
Expand All @@ -437,8 +437,8 @@ pub trait Deque<T> : MutableSeq<T> {
/// let mut d = RingBuf::new();
/// assert_eq!(d.front_mut(), None);
///
/// d.push_back(1i);
/// d.push_back(2i);
/// d.push(1i);
/// d.push(2i);
/// match d.front_mut() {
/// Some(x) => *x = 9i,
/// None => (),
Expand All @@ -458,8 +458,8 @@ pub trait Deque<T> : MutableSeq<T> {
/// let mut d = DList::new();
/// assert_eq!(d.back(), None);
///
/// d.push_back(1i);
/// d.push_back(2i);
/// d.push(1i);
/// d.push(2i);
/// assert_eq!(d.back(), Some(&2i));
/// ```
fn back<'a>(&'a self) -> Option<&'a T>;
Expand All @@ -475,8 +475,8 @@ pub trait Deque<T> : MutableSeq<T> {
/// let mut d = DList::new();
/// assert_eq!(d.back(), None);
///
/// d.push_back(1i);
/// d.push_back(2i);
/// d.push(1i);
/// d.push(2i);
/// match d.back_mut() {
/// Some(x) => *x = 9i,
/// None => (),
Expand All @@ -503,7 +503,7 @@ pub trait Deque<T> : MutableSeq<T> {
///
/// # Example
///
/// ```
/// ```ignore
/// use std::collections::{DList, Deque};
///
/// let mut d = DList::new();
Expand All @@ -518,7 +518,7 @@ pub trait Deque<T> : MutableSeq<T> {
///
/// # Example
///
/// ```
/// ```ignore
/// use std::collections::{RingBuf, Deque};
///
/// let mut d = RingBuf::new();
Expand All @@ -540,8 +540,8 @@ pub trait Deque<T> : MutableSeq<T> {
/// use std::collections::{RingBuf, Deque};
///
/// let mut d = RingBuf::new();
/// d.push_back(1i);
/// d.push_back(2i);
/// d.push(1i);
/// d.push(2i);
///
/// assert_eq!(d.pop_front(), Some(1i));
/// assert_eq!(d.pop_front(), Some(2i));
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/string.rs
Expand Up @@ -575,7 +575,7 @@ mod tests {
use std::prelude::*;
use test::Bencher;

use Mutable;
use {Mutable, MutableSeq};
use str;
use str::{Str, StrSlice, Owned, Slice};
use super::String;
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/vec.rs
Expand Up @@ -981,7 +981,7 @@ impl<T> Vec<T> {
///
/// # Example
///
/// ```
/// ```ignore
/// let mut vec = vec![1i, 2, 3];
/// vec.unshift(4);
/// assert_eq!(vec, vec![4, 1, 2, 3]);
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/collections/hashmap.rs
Expand Up @@ -1291,7 +1291,7 @@ impl<K: Eq + Hash<S>, V, S, H: Hasher<S>> HashMap<K, V, H> {
/// // new value based on the first letter of the key.
/// |key, already, new| {
/// if key.as_slice().starts_with("z") {
/// already.unshift(new);
/// already.insert(0, new);
/// } else {
/// already.push(new);
/// }
Expand Down

5 comments on commit 71a75cc

@bors
Copy link
Contributor

@bors bors commented on 71a75cc Jul 23, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at brson@71a75cc

@bors
Copy link
Contributor

@bors bors commented on 71a75cc Jul 23, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging brson/rust/pushpop = 71a75cc into auto

@bors
Copy link
Contributor

@bors bors commented on 71a75cc Jul 23, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brson/rust/pushpop = 71a75cc merged ok, testing candidate = fb72c47

@bors
Copy link
Contributor

@bors bors commented on 71a75cc Jul 24, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = fb72c47

Please sign in to comment.