diff options
| author | bors <bors@rust-lang.org> | 2017-03-28 21:10:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-03-28 21:10:07 +0000 |
| commit | 07a34293faeb10757944ce2fa9d552cc2b189583 (patch) | |
| tree | b25508bcd4d999249c34c2a4b751f2ca84d2a072 /src/librustc_data_structures | |
| parent | ccce2c6eb914a66571f60fa0afe8a46faa9fb3bd (diff) | |
| parent | 61928a03564f7bf8201d8a29d5a37efbc64d6712 (diff) | |
| download | rust-07a34293faeb10757944ce2fa9d552cc2b189583.tar.gz rust-07a34293faeb10757944ce2fa9d552cc2b189583.zip | |
Auto merge of #40867 - alexcrichton:rollup, r=alexcrichton
Rollup of 19 pull requests - Successful merges: #40317, #40516, #40524, #40606, #40683, #40751, #40778, #40813, #40818, #40819, #40824, #40828, #40832, #40833, #40837, #40849, #40852, #40853, #40865 - Failed merges:
Diffstat (limited to 'src/librustc_data_structures')
| -rw-r--r-- | src/librustc_data_structures/accumulate_vec.rs | 8 | ||||
| -rw-r--r-- | src/librustc_data_structures/base_n.rs | 2 | ||||
| -rw-r--r-- | src/librustc_data_structures/blake2b.rs | 2 | ||||
| -rw-r--r-- | src/librustc_data_structures/indexed_set.rs | 8 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/librustc_data_structures/accumulate_vec.rs b/src/librustc_data_structures/accumulate_vec.rs index d4bd9e707fd..c03c2890ba3 100644 --- a/src/librustc_data_structures/accumulate_vec.rs +++ b/src/librustc_data_structures/accumulate_vec.rs @@ -91,8 +91,8 @@ impl<A: Array> Deref for AccumulateVec<A> { type Target = [A::Element]; fn deref(&self) -> &Self::Target { match *self { - AccumulateVec::Array(ref v) => &v[..], - AccumulateVec::Heap(ref v) => &v[..], + AccumulateVec::Array(ref v) => v, + AccumulateVec::Heap(ref v) => v, } } } @@ -100,8 +100,8 @@ impl<A: Array> Deref for AccumulateVec<A> { impl<A: Array> DerefMut for AccumulateVec<A> { fn deref_mut(&mut self) -> &mut [A::Element] { match *self { - AccumulateVec::Array(ref mut v) => &mut v[..], - AccumulateVec::Heap(ref mut v) => &mut v[..], + AccumulateVec::Array(ref mut v) => v, + AccumulateVec::Heap(ref mut v) => v, } } } diff --git a/src/librustc_data_structures/base_n.rs b/src/librustc_data_structures/base_n.rs index 4359581a897..cf54229fa7f 100644 --- a/src/librustc_data_structures/base_n.rs +++ b/src/librustc_data_structures/base_n.rs @@ -48,7 +48,7 @@ pub fn encode(n: u64, base: u64) -> String { #[test] fn test_encode() { fn test(n: u64, base: u64) { - assert_eq!(Ok(n), u64::from_str_radix(&encode(n, base)[..], base as u32)); + assert_eq!(Ok(n), u64::from_str_radix(&encode(n, base), base as u32)); } for base in 2..37 { diff --git a/src/librustc_data_structures/blake2b.rs b/src/librustc_data_structures/blake2b.rs index 31492e26219..9d97a83f693 100644 --- a/src/librustc_data_structures/blake2b.rs +++ b/src/librustc_data_structures/blake2b.rs @@ -35,7 +35,7 @@ pub struct Blake2bCtx { impl ::std::fmt::Debug for Blake2bCtx { fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> Result<(), ::std::fmt::Error> { try!(write!(fmt, "hash: ")); - for v in &self.h[..] { + for v in &self.h { try!(write!(fmt, "{:x}", v)); } Ok(()) diff --git a/src/librustc_data_structures/indexed_set.rs b/src/librustc_data_structures/indexed_set.rs index 2e9e054e97e..572ce98d3ae 100644 --- a/src/librustc_data_structures/indexed_set.rs +++ b/src/librustc_data_structures/indexed_set.rs @@ -91,13 +91,13 @@ impl<T: Idx> IdxSet<T> { impl<T: Idx> Deref for IdxSetBuf<T> { type Target = IdxSet<T>; fn deref(&self) -> &IdxSet<T> { - unsafe { IdxSet::from_slice(&self.bits[..]) } + unsafe { IdxSet::from_slice(&self.bits) } } } impl<T: Idx> DerefMut for IdxSetBuf<T> { fn deref_mut(&mut self) -> &mut IdxSet<T> { - unsafe { IdxSet::from_slice_mut(&mut self.bits[..]) } + unsafe { IdxSet::from_slice_mut(&mut self.bits) } } } @@ -135,11 +135,11 @@ impl<T: Idx> IdxSet<T> { } pub fn words(&self) -> &[Word] { - &self.bits[..] + &self.bits } pub fn words_mut(&mut self) -> &mut [Word] { - &mut self.bits[..] + &mut self.bits } pub fn clone_from(&mut self, other: &IdxSet<T>) { |
