Skip to content

Commit

Permalink
Use none as the issue instead of 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerollmops committed Dec 10, 2020
1 parent 005912f commit 1b406af
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion library/alloc/src/slice.rs
Expand Up @@ -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};

////////////////////////////////////////////////////////////////////////////////
Expand Down
18 changes: 9 additions & 9 deletions library/core/src/slice/iter.rs
Expand Up @@ -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,
{
Expand Down Expand Up @@ -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,
{
Expand All @@ -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,
{ }
Expand All @@ -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,
{
Expand Down Expand Up @@ -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,
{
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/slice/mod.rs
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1b406af

Please sign in to comment.