diff options
Diffstat (limited to 'src/librustpkg/sha1.rs')
| -rw-r--r-- | src/librustpkg/sha1.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustpkg/sha1.rs b/src/librustpkg/sha1.rs index d955fd1aa97..db31f603d6e 100644 --- a/src/librustpkg/sha1.rs +++ b/src/librustpkg/sha1.rs @@ -94,7 +94,7 @@ fn add_bytes_to_bits<T: Int + CheckedAdd + ToBits>(bits: T, bytes: T) -> T { trait FixedBuffer { /// Input a vector of bytes. If the buffer becomes full, process it with the provided /// function and then clear the buffer. - fn input(&mut self, input: &[u8], func: &fn(&[u8])); + fn input(&mut self, input: &[u8], func: |&[u8]|); /// Reset the buffer. fn reset(&mut self); @@ -137,7 +137,7 @@ impl FixedBuffer64 { } impl FixedBuffer for FixedBuffer64 { - fn input(&mut self, input: &[u8], func: &fn(&[u8])) { + fn input(&mut self, input: &[u8], func: |&[u8]|) { let mut i = 0; let size = 64; @@ -217,11 +217,11 @@ trait StandardPadding { /// and is guaranteed to have exactly rem remaining bytes when it returns. If there are not at /// least rem bytes available, the buffer will be zero padded, processed, cleared, and then /// filled with zeros again until only rem bytes are remaining. - fn standard_padding(&mut self, rem: uint, func: &fn(&[u8])); + fn standard_padding(&mut self, rem: uint, func: |&[u8]|); } impl <T: FixedBuffer> StandardPadding for T { - fn standard_padding(&mut self, rem: uint, func: &fn(&[u8])) { + fn standard_padding(&mut self, rem: uint, func: |&[u8]|) { let size = self.size(); self.next(1)[0] = 128; |
