Remove redundant [..]s
This commit is contained in:
@@ -142,7 +142,7 @@ impl_stable_hash_via_hash!(Fingerprint);
|
||||
impl<E: rustc_serialize::Encoder> Encodable<E> for Fingerprint {
|
||||
#[inline]
|
||||
fn encode(&self, s: &mut E) -> Result<(), E::Error> {
|
||||
s.emit_raw_bytes(&self.to_le_bytes()[..])?;
|
||||
s.emit_raw_bytes(&self.to_le_bytes())?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
@@ -151,7 +151,7 @@ impl<D: rustc_serialize::Decoder> Decodable<D> for Fingerprint {
|
||||
#[inline]
|
||||
fn decode(d: &mut D) -> Result<Self, D::Error> {
|
||||
let mut bytes = [0u8; 16];
|
||||
d.read_raw_bytes_into(&mut bytes[..])?;
|
||||
d.read_raw_bytes_into(&mut bytes)?;
|
||||
Ok(Fingerprint::from_le_bytes(bytes))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -649,7 +649,7 @@ impl Drop for VerboseTimingGuard<'_> {
|
||||
fn drop(&mut self) {
|
||||
if let Some((start_time, start_rss, ref message)) = self.start_and_message {
|
||||
let end_rss = get_resident_set_size();
|
||||
print_time_passes_entry(&message[..], start_time.elapsed(), start_rss, end_rss);
|
||||
print_time_passes_entry(&message, start_time.elapsed(), start_rss, end_rss);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ impl SmallCStr {
|
||||
|
||||
#[inline]
|
||||
pub fn as_c_str(&self) -> &ffi::CStr {
|
||||
unsafe { ffi::CStr::from_bytes_with_nul_unchecked(&self.data[..]) }
|
||||
unsafe { ffi::CStr::from_bytes_with_nul_unchecked(&self.data) }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
||||
Reference in New Issue
Block a user