]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_back/sha2.rs
remove unnecessary parentheses from range notation
[rust.git] / src / librustc_back / sha2.rs
index ac5662f534c86c4fa229ac14eb590f679b6348af..0228098b8f8384c4aad7eb4068b401504d372381 100644 (file)
@@ -140,7 +140,7 @@ fn input<F>(&mut self, input: &[u8], mut func: F) where
             if input.len() >= buffer_remaining {
                     copy_memory(
                         self.buffer.slice_mut(self.buffer_idx, size),
-                        &input[0..buffer_remaining]);
+                        &input[..buffer_remaining]);
                 self.buffer_idx = 0;
                 func(&self.buffer);
                 i += buffer_remaining;
@@ -156,7 +156,7 @@ fn input<F>(&mut self, input: &[u8], mut func: F) where
         // While we have at least a full buffer size chunk's worth of data, process that data
         // without copying it into the buffer
         while input.len() - i >= size {
-            func(&input[i..(i + size)]);
+            func(&input[i..i + size]);
             i += size;
         }
 
@@ -188,7 +188,7 @@ fn next<'s>(&'s mut self, len: uint) -> &'s mut [u8] {
     fn full_buffer<'s>(&'s mut self) -> &'s [u8] {
         assert!(self.buffer_idx == 64);
         self.buffer_idx = 0;
-        return &self.buffer[0..64];
+        return &self.buffer[..64];
     }
 
     fn position(&self) -> uint { self.buffer_idx }