about summary refs log tree commit diff
path: root/src/libunicode
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2015-01-23 10:54:32 -0500
committerJorge Aparicio <japaricious@gmail.com>2015-01-30 10:37:44 -0500
commited82b5a70e0ddeea284addef7762375ae5880672 (patch)
tree26e98bf39719ee5c9695ed9847ba3170b249e742 /src/libunicode
parent9070345c0ef6ceb38aced40aee3deee4ca2f8e17 (diff)
remove Copy impls from iterators
Diffstat (limited to 'src/libunicode')
-rw-r--r--src/libunicode/u_str.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libunicode/u_str.rs b/src/libunicode/u_str.rs
index 370f59a5b26..9a757c0c980 100644
--- a/src/libunicode/u_str.rs
+++ b/src/libunicode/u_str.rs
@@ -447,7 +447,7 @@ impl<'a> Iterator for Utf16Items<'a> {
             Some(Utf16Item::LoneSurrogate(u))
         } else {
             // preserve state for rewinding.
-            let old = self.iter;
+            let old = self.iter.clone();
 
             let u2 = match self.iter.next() {
                 Some(u2) => *u2,
@@ -457,7 +457,7 @@ impl<'a> Iterator for Utf16Items<'a> {
             if u2 < 0xDC00 || u2 > 0xDFFF {
                 // not a trailing surrogate so we're not a valid
                 // surrogate pair, so rewind to redecode u2 next time.
-                self.iter = old;
+                self.iter = old.clone();
                 return Some(Utf16Item::LoneSurrogate(u))
             }