Rollup merge of #22898 - edwardw:one-less-unsafe-impl, r=huonw
These implementations were temporary workaround. Now #22828 has been fixed, they can be removed.
This commit is contained in:
commit
3c1f61ce63
@ -68,7 +68,7 @@ use num::{ToPrimitive, Int};
|
|||||||
use ops::{Add, Deref, FnMut};
|
use ops::{Add, Deref, FnMut};
|
||||||
use option::Option;
|
use option::Option;
|
||||||
use option::Option::{Some, None};
|
use option::Option::{Some, None};
|
||||||
use marker::{Send, Sized, Sync};
|
use marker::Sized;
|
||||||
use usize;
|
use usize;
|
||||||
|
|
||||||
/// An interface for dealing with "external iterators". These types of iterators
|
/// An interface for dealing with "external iterators". These types of iterators
|
||||||
@ -1783,10 +1783,6 @@ pub struct Peekable<I: Iterator> {
|
|||||||
peeked: Option<I::Item>,
|
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 {
|
impl<I: Iterator + Clone> Clone for Peekable<I> where I::Item: Clone {
|
||||||
fn clone(&self) -> Peekable<I> {
|
fn clone(&self) -> Peekable<I> {
|
||||||
Peekable {
|
Peekable {
|
||||||
|
Loading…
Reference in New Issue
Block a user