diff options
| author | bors <bors@rust-lang.org> | 2014-02-14 12:21:51 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-02-14 12:21:51 -0800 |
| commit | 3f717bbe96014c04c4c439ed0b0975ca36a73e53 (patch) | |
| tree | 8efaf70dc83bb23098e7d0e47a65cdeb963bba8a /src/libsyntax/util | |
| parent | 994747022a45b5c2b03f38dddbe8b43bf09679f3 (diff) | |
| parent | 2f8dbf210215039f39a80424d9c43f96ff79dad4 (diff) | |
| download | rust-3f717bbe96014c04c4c439ed0b0975ca36a73e53.tar.gz rust-3f717bbe96014c04c4c439ed0b0975ca36a73e53.zip | |
auto merge of #12267 : alexcrichton/rust/rollup, r=alexcrichton
The last commit has the closed PRs
Diffstat (limited to 'src/libsyntax/util')
| -rw-r--r-- | src/libsyntax/util/small_vector.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libsyntax/util/small_vector.rs b/src/libsyntax/util/small_vector.rs index e0d7fdd8790..32e5b83ee04 100644 --- a/src/libsyntax/util/small_vector.rs +++ b/src/libsyntax/util/small_vector.rs @@ -1,4 +1,4 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -64,6 +64,12 @@ impl<T> SmallVector<T> { } } + pub fn push_all(&mut self, other: SmallVector<T>) { + for v in other.move_iter() { + self.push(v); + } + } + pub fn get<'a>(&'a self, idx: uint) -> &'a T { match *self { One(ref v) if idx == 0 => v, |
