diff options
| author | bors <bors@rust-lang.org> | 2013-11-28 20:31:39 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-11-28 20:31:39 -0800 |
| commit | bf6964ecb67f4ffce6be75130ab7a3be793960ff (patch) | |
| tree | ddf8aabea4d05b3ae0cb977cc1a466526f871b06 /src/libsyntax/util/small_vector.rs | |
| parent | 90d06ecf6b26e949921778f0d479ea1532077200 (diff) | |
| parent | ab387a68388974a432951e806851936898907fd0 (diff) | |
| download | rust-bf6964ecb67f4ffce6be75130ab7a3be793960ff.tar.gz rust-bf6964ecb67f4ffce6be75130ab7a3be793960ff.zip | |
auto merge of #10709 : alexcrichton/rust/snapshot, r=pcwalton
Diffstat (limited to 'src/libsyntax/util/small_vector.rs')
| -rw-r--r-- | src/libsyntax/util/small_vector.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/util/small_vector.rs b/src/libsyntax/util/small_vector.rs index 71eee8b7ccc..0e07ee23b67 100644 --- a/src/libsyntax/util/small_vector.rs +++ b/src/libsyntax/util/small_vector.rs @@ -21,7 +21,7 @@ impl<T> Container for SmallVector<T> { fn len(&self) -> uint { match *self { Zero => 0, - One(*) => 1, + One(..) => 1, Many(ref vals) => vals.len() } } @@ -53,7 +53,7 @@ impl<T> SmallVector<T> { pub fn push(&mut self, v: T) { match *self { Zero => *self = One(v), - One(*) => { + One(..) => { let one = util::replace(self, Zero); match one { One(v1) => util::replace(self, Many(~[v1, v])), @@ -99,7 +99,7 @@ impl<T> Iterator<T> for SmallVectorMoveIterator<T> { fn next(&mut self) -> Option<T> { match *self { ZeroIterator => None, - OneIterator(*) => { + OneIterator(..) => { let mut replacement = ZeroIterator; util::swap(self, &mut replacement); match replacement { @@ -114,7 +114,7 @@ impl<T> Iterator<T> for SmallVectorMoveIterator<T> { fn size_hint(&self) -> (uint, Option<uint>) { match *self { ZeroIterator => (0, Some(0)), - OneIterator(*) => (1, Some(1)), + OneIterator(..) => (1, Some(1)), ManyIterator(ref inner) => inner.size_hint() } } |
