diff options
| author | Edward Wang <edward.yu.wang@gmail.com> | 2015-02-28 22:39:50 +0800 |
|---|---|---|
| committer | Edward Wang <edward.yu.wang@gmail.com> | 2015-02-28 22:39:50 +0800 |
| commit | 2b8207a56d74bf97d93db2aad962c7ce56d3b98a (patch) | |
| tree | e873975894782a32528b5b4d96247ad96c62f60a | |
| parent | 6f8d83140618721e7b72a78f2e53a08e71e1d4cb (diff) | |
| download | rust-2b8207a56d74bf97d93db2aad962c7ce56d3b98a.tar.gz rust-2b8207a56d74bf97d93db2aad962c7ce56d3b98a.zip | |
Remove two unsafe impls from `iter::Peekable`
These implementations were temporary workaround. Now #22828 has been fixed, they can be removed.
| -rw-r--r-- | src/libcore/iter.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index 94cc933d844..26acd757f89 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -68,7 +68,7 @@ use num::{ToPrimitive, Int}; use ops::{Add, Deref, FnMut}; use option::Option; use option::Option::{Some, None}; -use marker::{Send, Sized, Sync}; +use marker::Sized; use usize; /// An interface for dealing with "external iterators". These types of iterators @@ -1783,10 +1783,6 @@ pub struct Peekable<I: Iterator> { peeked: Option<I::Item>, } -// FIXME: after #22828 being fixed, the following unsafe impl should be removed -unsafe impl<I: Iterator> Sync for Peekable<I> where I: Sync, I::Item: Sync {} -unsafe impl<I: Iterator> Send for Peekable<I> where I: Send, I::Item: Send {} - impl<I: Iterator + Clone> Clone for Peekable<I> where I::Item: Clone { fn clone(&self) -> Peekable<I> { Peekable { |
