diff options
| author | bors <bors@rust-lang.org> | 2014-03-31 00:51:35 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-03-31 00:51:35 -0700 |
| commit | abb616209d23f0883f4e96253c4233c29741fc7d (patch) | |
| tree | b860d566ba0c30adf456121deb4b807daa4dfaba /src/libsyntax | |
| parent | 6281299230aca568723463897ed7448c9b51c4a7 (diff) | |
| parent | ee052198c51599c987a6d2e9601eaaba21316c52 (diff) | |
| download | rust-abb616209d23f0883f4e96253c4233c29741fc7d.tar.gz rust-abb616209d23f0883f4e96253c4233c29741fc7d.zip | |
auto merge of #13220 : brson/rust/from_iter, r=thestinger
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/owned_slice.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/util/small_vector.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/owned_slice.rs b/src/libsyntax/owned_slice.rs index 33829212686..e5e3a05f998 100644 --- a/src/libsyntax/owned_slice.rs +++ b/src/libsyntax/owned_slice.rs @@ -126,7 +126,7 @@ impl<T> Container for OwnedSlice<T> { } impl<T> FromIterator<T> for OwnedSlice<T> { - fn from_iterator<I: Iterator<T>>(mut iter: I) -> OwnedSlice<T> { + fn from_iter<I: Iterator<T>>(mut iter: I) -> OwnedSlice<T> { OwnedSlice::from_vec(iter.collect()) } } diff --git a/src/libsyntax/util/small_vector.rs b/src/libsyntax/util/small_vector.rs index 9d6295e3f28..1dcebd7a016 100644 --- a/src/libsyntax/util/small_vector.rs +++ b/src/libsyntax/util/small_vector.rs @@ -29,7 +29,7 @@ impl<T> Container for SmallVector<T> { } impl<T> FromIterator<T> for SmallVector<T> { - fn from_iterator<I: Iterator<T>>(iter: I) -> SmallVector<T> { + fn from_iter<I: Iterator<T>>(iter: I) -> SmallVector<T> { let mut v = Zero; v.extend(iter); v @@ -167,7 +167,7 @@ mod test { } #[test] - fn test_from_iterator() { + fn test_from_iter() { let v: SmallVector<int> = (vec!(1, 2, 3)).move_iter().collect(); assert_eq!(3, v.len()); assert_eq!(&1, v.get(0)); |
