diff options
| author | ljedrz <ljedrz@gmail.com> | 2018-08-04 14:58:20 +0200 |
|---|---|---|
| committer | ljedrz <ljedrz@gmail.com> | 2018-08-04 14:58:20 +0200 |
| commit | d46dca66c9c18477ddebe87edb6b8f0f8ca22aa3 (patch) | |
| tree | 3272c4b09c9698afb516f36b1d43fcebf62cab94 /src/libcore/slice | |
| parent | 579adf8c727861841b4819b4913385c2782977fb (diff) | |
| download | rust-d46dca66c9c18477ddebe87edb6b8f0f8ca22aa3.tar.gz rust-d46dca66c9c18477ddebe87edb6b8f0f8ca22aa3.zip | |
Remove redundant field names in structs
Diffstat (limited to 'src/libcore/slice')
| -rw-r--r-- | src/libcore/slice/mod.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index a4dde38cb7b..dfebe460ff8 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -621,7 +621,7 @@ impl<T> [T] { #[inline] pub fn windows(&self, size: usize) -> Windows<T> { assert!(size != 0); - Windows { v: self, size: size } + Windows { v: self, size } } /// Returns an iterator over `chunk_size` elements of the slice at a @@ -652,7 +652,7 @@ impl<T> [T] { #[inline] pub fn chunks(&self, chunk_size: usize) -> Chunks<T> { assert!(chunk_size != 0); - Chunks { v: self, chunk_size: chunk_size } + Chunks { v: self, chunk_size } } /// Returns an iterator over `chunk_size` elements of the slice at a time. @@ -687,7 +687,7 @@ impl<T> [T] { #[inline] pub fn chunks_mut(&mut self, chunk_size: usize) -> ChunksMut<T> { assert!(chunk_size != 0); - ChunksMut { v: self, chunk_size: chunk_size } + ChunksMut { v: self, chunk_size } } /// Returns an iterator over `chunk_size` elements of the slice at a @@ -724,7 +724,7 @@ impl<T> [T] { let rem = self.len() % chunk_size; let len = self.len() - rem; let (fst, snd) = self.split_at(len); - ExactChunks { v: fst, rem: snd, chunk_size: chunk_size} + ExactChunks { v: fst, rem: snd, chunk_size } } /// Returns an iterator over `chunk_size` elements of the slice at a time. @@ -766,7 +766,7 @@ impl<T> [T] { let rem = self.len() % chunk_size; let len = self.len() - rem; let (fst, snd) = self.split_at_mut(len); - ExactChunksMut { v: fst, rem: snd, chunk_size: chunk_size} + ExactChunksMut { v: fst, rem: snd, chunk_size } } /// Divides one slice into two at an index. @@ -916,7 +916,7 @@ impl<T> [T] { pub fn split_mut<F>(&mut self, pred: F) -> SplitMut<T, F> where F: FnMut(&T) -> bool { - SplitMut { v: self, pred: pred, finished: false } + SplitMut { v: self, pred, finished: false } } /// Returns an iterator over subslices separated by elements that match |
