Skip to content

Commit

Permalink
auto merge of #11510 : wycats/rust/clone-treeset, r=huonw
Browse files Browse the repository at this point in the history
  • Loading branch information
bors committed Jan 13, 2014
2 parents b93a4da + 8f6ffde commit caf316a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/libextra/treemap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ impl<'a, T> Iterator<&'a T> for TreeSetRevIterator<'a, T> {
/// A implementation of the `Set` trait on top of the `TreeMap` container. The
/// only requirement is that the type of the elements contained ascribes to the
/// `TotalOrd` trait.
#[deriving(Clone)]
pub struct TreeSet<T> {
priv map: TreeMap<T, ()>
}
Expand Down Expand Up @@ -1588,6 +1589,16 @@ mod test_set {
}
}

#[test]
fn test_clone_eq() {
let mut m = TreeSet::new();

m.insert(1);
m.insert(2);

assert!(m.clone() == m);
}

fn check(a: &[int],
b: &[int],
expected: &[int],
Expand Down

0 comments on commit caf316a

Please sign in to comment.