From 2b8207a56d74bf97d93db2aad962c7ce56d3b98a Mon Sep 17 00:00:00 2001 From: Edward Wang Date: Sat, 28 Feb 2015 22:39:50 +0800 Subject: [PATCH] Remove two unsafe impls from `iter::Peekable` These implementations were temporary workaround. Now #22828 has been fixed, they can be removed. --- src/libcore/iter.rs | 6 +----- 1 file changed, 1 insertion(+), 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 { peeked: Option, } -// FIXME: after #22828 being fixed, the following unsafe impl should be removed -unsafe impl Sync for Peekable where I: Sync, I::Item: Sync {} -unsafe impl Send for Peekable where I: Send, I::Item: Send {} - impl Clone for Peekable where I::Item: Clone { fn clone(&self) -> Peekable { Peekable {