mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-08 21:13:55 +00:00
Use none as the issue instead of 0
This commit is contained in:
parent
005912fce8
commit
1b406afe23
@ -118,7 +118,7 @@ pub use core::slice::{RChunks, RChunksExact, RChunksExactMut, RChunksMut};
|
||||
pub use core::slice::{RSplit, RSplitMut};
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use core::slice::{RSplitN, RSplitNMut, SplitN, SplitNMut};
|
||||
#[unstable(feature = "slice_group_by", issue = "0")]
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
pub use core::slice::{GroupBy, GroupByMut};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -2974,21 +2974,21 @@ unsafe impl<'a, T> TrustedRandomAccess for IterMut<'a, T> {
|
||||
///
|
||||
/// [`group_by`]: ../../std/primitive.slice.html#method.group_by
|
||||
/// [slices]: ../../std/primitive.slice.html
|
||||
#[unstable(feature = "slice_group_by", issue = "0")]
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
#[derive(Debug)] // FIXME implement Debug to be more user friendly
|
||||
pub struct GroupBy<'a, T: 'a, P> {
|
||||
slice: &'a [T],
|
||||
predicate: P,
|
||||
}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "0")]
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
impl<'a, T: 'a, P> GroupBy<'a, T, P> {
|
||||
pub(super) fn new(slice: &'a [T], predicate: P) -> Self {
|
||||
GroupBy { slice, predicate }
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "0")]
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
impl<'a, T: 'a, P> Iterator for GroupBy<'a, T, P>
|
||||
where P: FnMut(&T, &T) -> bool,
|
||||
{
|
||||
@ -3025,7 +3025,7 @@ where P: FnMut(&T, &T) -> bool,
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "0")]
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
impl<'a, T: 'a, P> DoubleEndedIterator for GroupBy<'a, T, P>
|
||||
where P: FnMut(&T, &T) -> bool,
|
||||
{
|
||||
@ -3046,7 +3046,7 @@ where P: FnMut(&T, &T) -> bool,
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "0")]
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
impl<'a, T: 'a, P> FusedIterator for GroupBy<'a, T, P>
|
||||
where P: FnMut(&T, &T) -> bool,
|
||||
{ }
|
||||
@ -3058,21 +3058,21 @@ where P: FnMut(&T, &T) -> bool,
|
||||
///
|
||||
/// [`group_by_mut`]: ../../std/primitive.slice.html#method.group_by_mut
|
||||
/// [slices]: ../../std/primitive.slice.html
|
||||
#[unstable(feature = "slice_group_by", issue = "0")]
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
#[derive(Debug)] // FIXME implement Debug to be more user friendly
|
||||
pub struct GroupByMut<'a, T: 'a, P> {
|
||||
slice: &'a mut [T],
|
||||
predicate: P,
|
||||
}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "0")]
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
impl<'a, T: 'a, P> GroupByMut<'a, T, P> {
|
||||
pub(super) fn new(slice: &'a mut [T], predicate: P) -> Self {
|
||||
GroupByMut { slice, predicate }
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "0")]
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
impl<'a, T: 'a, P> Iterator for GroupByMut<'a, T, P>
|
||||
where P: FnMut(&T, &T) -> bool,
|
||||
{
|
||||
@ -3110,7 +3110,7 @@ where P: FnMut(&T, &T) -> bool,
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "0")]
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
impl<'a, T: 'a, P> DoubleEndedIterator for GroupByMut<'a, T, P>
|
||||
where P: FnMut(&T, &T) -> bool,
|
||||
{
|
||||
|
@ -1228,7 +1228,7 @@ impl<T> [T] {
|
||||
/// assert_eq!(iter.next(), Some(&[2, 2, 2][..]));
|
||||
/// assert_eq!(iter.next(), None);
|
||||
/// ```
|
||||
#[unstable(feature = "slice_group_by", issue = "0")]
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
#[inline]
|
||||
pub fn group_by<F>(&self, pred: F) -> GroupBy<T, F>
|
||||
where F: FnMut(&T, &T) -> bool
|
||||
@ -1257,7 +1257,7 @@ impl<T> [T] {
|
||||
/// assert_eq!(iter.next(), Some(&mut [2, 2, 2][..]));
|
||||
/// assert_eq!(iter.next(), None);
|
||||
/// ```
|
||||
#[unstable(feature = "slice_group_by", issue = "0")]
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
#[inline]
|
||||
pub fn group_by_mut<F>(&mut self, pred: F) -> GroupByMut<T, F>
|
||||
where F: FnMut(&T, &T) -> bool
|
||||
|
Loading…
Reference in New Issue
Block a user