Fix the fmt issues
This commit is contained in:
parent
45693b43a5
commit
7952ea5a04
@ -110,6 +110,8 @@ pub use core::slice::{Chunks, Windows};
|
||||
pub use core::slice::{ChunksExact, ChunksExactMut};
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use core::slice::{ChunksMut, Split, SplitMut};
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
pub use core::slice::{GroupBy, GroupByMut};
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use core::slice::{Iter, IterMut};
|
||||
#[stable(feature = "rchunks", since = "1.31.0")]
|
||||
@ -118,8 +120,6 @@ 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 = "none")]
|
||||
pub use core::slice::{GroupBy, GroupByMut};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Basic slice extension methods
|
||||
|
@ -2991,7 +2991,8 @@ impl<'a, T: 'a, P> GroupBy<'a, T, P> {
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
impl<'a, T: 'a, P> Iterator for GroupBy<'a, T, P>
|
||||
where P: FnMut(&T, &T) -> bool,
|
||||
where
|
||||
P: FnMut(&T, &T) -> bool,
|
||||
{
|
||||
type Item = &'a [T];
|
||||
|
||||
@ -3013,11 +3014,7 @@ where P: FnMut(&T, &T) -> bool,
|
||||
|
||||
#[inline]
|
||||
fn size_hint(&self) -> (usize, Option<usize>) {
|
||||
if self.slice.is_empty() {
|
||||
(0, Some(0))
|
||||
} else {
|
||||
(1, Some(self.slice.len()))
|
||||
}
|
||||
if self.slice.is_empty() { (0, Some(0)) } else { (1, Some(self.slice.len())) }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
@ -3028,7 +3025,8 @@ where P: FnMut(&T, &T) -> bool,
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
impl<'a, T: 'a, P> DoubleEndedIterator for GroupBy<'a, T, P>
|
||||
where P: FnMut(&T, &T) -> bool,
|
||||
where
|
||||
P: FnMut(&T, &T) -> bool,
|
||||
{
|
||||
#[inline]
|
||||
fn next_back(&mut self) -> Option<Self::Item> {
|
||||
@ -3048,9 +3046,7 @@ where P: FnMut(&T, &T) -> bool,
|
||||
}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
impl<'a, T: 'a, P> FusedIterator for GroupBy<'a, T, P>
|
||||
where P: FnMut(&T, &T) -> bool,
|
||||
{ }
|
||||
impl<'a, T: 'a, P> FusedIterator for GroupBy<'a, T, P> where P: FnMut(&T, &T) -> bool {}
|
||||
|
||||
/// An iterator over slice in (non-overlapping) mutable chunks separated
|
||||
/// by a predicate.
|
||||
@ -3075,7 +3071,8 @@ impl<'a, T: 'a, P> GroupByMut<'a, T, P> {
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
impl<'a, T: 'a, P> Iterator for GroupByMut<'a, T, P>
|
||||
where P: FnMut(&T, &T) -> bool,
|
||||
where
|
||||
P: FnMut(&T, &T) -> bool,
|
||||
{
|
||||
type Item = &'a mut [T];
|
||||
|
||||
@ -3098,11 +3095,7 @@ where P: FnMut(&T, &T) -> bool,
|
||||
|
||||
#[inline]
|
||||
fn size_hint(&self) -> (usize, Option<usize>) {
|
||||
if self.slice.is_empty() {
|
||||
(0, Some(0))
|
||||
} else {
|
||||
(1, Some(self.slice.len()))
|
||||
}
|
||||
if self.slice.is_empty() { (0, Some(0)) } else { (1, Some(self.slice.len())) }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
@ -3113,7 +3106,8 @@ where P: FnMut(&T, &T) -> bool,
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
impl<'a, T: 'a, P> DoubleEndedIterator for GroupByMut<'a, T, P>
|
||||
where P: FnMut(&T, &T) -> bool,
|
||||
where
|
||||
P: FnMut(&T, &T) -> bool,
|
||||
{
|
||||
#[inline]
|
||||
fn next_back(&mut self) -> Option<Self::Item> {
|
||||
@ -3132,3 +3126,6 @@ where P: FnMut(&T, &T) -> bool,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "slice_group_by", issue = "none")]
|
||||
impl<'a, T: 'a, P> FusedIterator for GroupByMut<'a, T, P> where P: FnMut(&T, &T) -> bool {}
|
||||
|
@ -1234,7 +1234,8 @@ impl<T> [T] {
|
||||
#[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
|
||||
where
|
||||
F: FnMut(&T, &T) -> bool,
|
||||
{
|
||||
GroupBy::new(self, pred)
|
||||
}
|
||||
@ -1263,7 +1264,8 @@ impl<T> [T] {
|
||||
#[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
|
||||
where
|
||||
F: FnMut(&T, &T) -> bool,
|
||||
{
|
||||
GroupByMut::new(self, pred)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user