diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2013-12-15 22:23:11 +1100 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2013-12-15 22:23:11 +1100 |
| commit | f97040a93b7320af9963660b24a4b60b8bdd461a (patch) | |
| tree | cf1bfeab8124874a58945c15495553c8c4fccd3c /src/librustpkg | |
| parent | 8f6df87c1d876895a7e313728b43d9710ae682bb (diff) | |
std::vec: remove unnecessary count parameter on {bytes,
raw}::copy_memory. Slices carry their length with them, so we can just use that information.
Diffstat (limited to 'src/librustpkg')
| -rw-r--r-- | src/librustpkg/sha1.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/librustpkg/sha1.rs b/src/librustpkg/sha1.rs index 396ef756c76..06970561fac 100644 --- a/src/librustpkg/sha1.rs +++ b/src/librustpkg/sha1.rs @@ -149,16 +149,14 @@ impl FixedBuffer for FixedBuffer64 { if input.len() >= buffer_remaining { copy_memory( self.buffer.mut_slice(self.buffer_idx, size), - input.slice_to(buffer_remaining), - buffer_remaining); + input.slice_to(buffer_remaining)); self.buffer_idx = 0; func(self.buffer); i += buffer_remaining; } else { copy_memory( self.buffer.mut_slice(self.buffer_idx, self.buffer_idx + input.len()), - input, - input.len()); + input); self.buffer_idx += input.len(); return; } @@ -177,8 +175,7 @@ impl FixedBuffer for FixedBuffer64 { let input_remaining = input.len() - i; copy_memory( self.buffer.mut_slice(0, input_remaining), - input.slice_from(i), - input.len() - i); + input.slice_from(i)); self.buffer_idx += input_remaining; } |
