summary refs log tree commit diff
path: root/src/libstd/sys/common
diff options
context:
space:
mode:
authorAlexis <a.beingessner@gmail.com>2015-02-18 13:06:21 -0500
committerAlexis <a.beingessner@gmail.com>2015-02-18 14:01:47 -0500
commit66613e26b95438c02e2f5c273c557515454121f7 (patch)
treeed2b84cfeb042660366256e38010adb0eb5bc272 /src/libstd/sys/common
parent4a9d190423f67a00053f4b5c9869f0ccbdfcc689 (diff)
downloadrust-66613e26b95438c02e2f5c273c557515454121f7.tar.gz
rust-66613e26b95438c02e2f5c273c557515454121f7.zip
make FromIterator use IntoIterator
This breaks all implementors of FromIterator, as they must now accept IntoIterator instead of Iterator. The fix for this is generally trivial (change the bound, and maybe call into_iter() on the argument to get the old argument).

Users of FromIterator should be unaffected because Iterators are IntoIterator.

[breaking-change]
Diffstat (limited to 'src/libstd/sys/common')
-rw-r--r--src/libstd/sys/common/wtf8.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys/common/wtf8.rs b/src/libstd/sys/common/wtf8.rs
index e7cb67c6287..da5ab8e434a 100644
--- a/src/libstd/sys/common/wtf8.rs
+++ b/src/libstd/sys/common/wtf8.rs
@@ -356,9 +356,9 @@ impl Wtf8Buf {
 /// This replaces surrogate code point pairs with supplementary code points,
 /// like concatenating ill-formed UTF-16 strings effectively would.
 impl FromIterator<CodePoint> for Wtf8Buf {
-    fn from_iter<T: Iterator<Item=CodePoint>>(iterator: T) -> Wtf8Buf {
+    fn from_iter<T: IntoIterator<Item=CodePoint>>(iter: T) -> Wtf8Buf {
         let mut string = Wtf8Buf::new();
-        string.extend(iterator);
+        string.extend(iter);
         string
     }
 }