Skip to content

Commit d8464fa

Browse files
committed
---
yaml --- r: 149115 b: refs/heads/try2 c: b0ac40a h: refs/heads/master i: 149113: a3e809a 149111: 3fc682e v: v3
1 parent f099cc2 commit d8464fa

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 8dff89c238a22b18b18c83f6ccafd94f66507f70
8+
refs/heads/try2: b0ac40a243b1385ecf0bc25505fa3e65f32013c3
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/util/sha2.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,18 +453,20 @@ impl Engine256 {
453453
assert!(!self.finished)
454454
// Assumes that input.len() can be converted to u64 without overflow
455455
self.length_bits = add_bytes_to_bits(self.length_bits, input.len() as u64);
456-
self.buffer.input(input, |input: &[u8]| { self.state.process_block(input) });
456+
let self_state = &mut self.state;
457+
self.buffer.input(input, |input: &[u8]| { self_state.process_block(input) });
457458
}
458459

459460
fn finish(&mut self) {
460461
if self.finished {
461462
return;
462463
}
463464

464-
self.buffer.standard_padding(8, |input: &[u8]| { self.state.process_block(input) });
465+
let self_state = &mut self.state;
466+
self.buffer.standard_padding(8, |input: &[u8]| { self_state.process_block(input) });
465467
write_u32_be(self.buffer.next(4), (self.length_bits >> 32) as u32 );
466468
write_u32_be(self.buffer.next(4), self.length_bits as u32);
467-
self.state.process_block(self.buffer.full_buffer());
469+
self_state.process_block(self.buffer.full_buffer());
468470

469471
self.finished = true;
470472
}

0 commit comments

Comments
 (0)