Use none as the issue instead of 0
This commit is contained in:
parent
005912fce8
commit
1b406afe23
3 changed files with 12 additions and 12 deletions
|
@ -118,7 +118,7 @@ pub use core::slice::{RChunks, RChunksExact, RChunksExactMut, RChunksMut};
|
||||||
pub use core::slice::{RSplit, RSplitMut};
|
pub use core::slice::{RSplit, RSplitMut};
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub use core::slice::{RSplitN, RSplitNMut, SplitN, SplitNMut};
|
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};
|
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
|
/// [`group_by`]: ../../std/primitive.slice.html#method.group_by
|
||||||
/// [slices]: ../../std/primitive.slice.html
|
/// [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
|
#[derive(Debug)] // FIXME implement Debug to be more user friendly
|
||||||
pub struct GroupBy<'a, T: 'a, P> {
|
pub struct GroupBy<'a, T: 'a, P> {
|
||||||
slice: &'a [T],
|
slice: &'a [T],
|
||||||
predicate: P,
|
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> {
|
impl<'a, T: 'a, P> GroupBy<'a, T, P> {
|
||||||
pub(super) fn new(slice: &'a [T], predicate: P) -> Self {
|
pub(super) fn new(slice: &'a [T], predicate: P) -> Self {
|
||||||
GroupBy { slice, predicate }
|
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>
|
impl<'a, T: 'a, P> Iterator for GroupBy<'a, T, P>
|
||||||
where P: FnMut(&T, &T) -> bool,
|
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>
|
impl<'a, T: 'a, P> DoubleEndedIterator for GroupBy<'a, T, P>
|
||||||
where P: FnMut(&T, &T) -> bool,
|
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>
|
impl<'a, T: 'a, P> FusedIterator for GroupBy<'a, T, P>
|
||||||
where P: FnMut(&T, &T) -> bool,
|
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
|
/// [`group_by_mut`]: ../../std/primitive.slice.html#method.group_by_mut
|
||||||
/// [slices]: ../../std/primitive.slice.html
|
/// [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
|
#[derive(Debug)] // FIXME implement Debug to be more user friendly
|
||||||
pub struct GroupByMut<'a, T: 'a, P> {
|
pub struct GroupByMut<'a, T: 'a, P> {
|
||||||
slice: &'a mut [T],
|
slice: &'a mut [T],
|
||||||
predicate: P,
|
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> {
|
impl<'a, T: 'a, P> GroupByMut<'a, T, P> {
|
||||||
pub(super) fn new(slice: &'a mut [T], predicate: P) -> Self {
|
pub(super) fn new(slice: &'a mut [T], predicate: P) -> Self {
|
||||||
GroupByMut { slice, predicate }
|
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>
|
impl<'a, T: 'a, P> Iterator for GroupByMut<'a, T, P>
|
||||||
where P: FnMut(&T, &T) -> bool,
|
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>
|
impl<'a, T: 'a, P> DoubleEndedIterator for GroupByMut<'a, T, P>
|
||||||
where P: FnMut(&T, &T) -> bool,
|
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(), Some(&[2, 2, 2][..]));
|
||||||
/// assert_eq!(iter.next(), None);
|
/// assert_eq!(iter.next(), None);
|
||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "slice_group_by", issue = "0")]
|
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn group_by<F>(&self, pred: F) -> GroupBy<T, F>
|
pub fn group_by<F>(&self, pred: F) -> GroupBy<T, F>
|
||||||
where F: FnMut(&T, &T) -> bool
|
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(), Some(&mut [2, 2, 2][..]));
|
||||||
/// assert_eq!(iter.next(), None);
|
/// assert_eq!(iter.next(), None);
|
||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "slice_group_by", issue = "0")]
|
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn group_by_mut<F>(&mut self, pred: F) -> GroupByMut<T, F>
|
pub fn group_by_mut<F>(&mut self, pred: F) -> GroupByMut<T, F>
|
||||||
where F: FnMut(&T, &T) -> bool
|
where F: FnMut(&T, &T) -> bool
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue