Skip to content

Commit

Permalink
Remove two unsafe impls from iter::Peekable
Browse files Browse the repository at this point in the history
These implementations were temporary workaround. Now #22828 has been
fixed, they can be removed.
  • Loading branch information
edwardw committed Feb 28, 2015
1 parent 6f8d831 commit 2b8207a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/libcore/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 2b8207a

Please sign in to comment.