More complete fix to #3162 (borrowck bug related to access to rec fields)
This commit is contained in:
parent
83e7c869bd
commit
a08f3a7d4d
9 changed files with 51 additions and 39 deletions
|
|
@ -158,7 +158,8 @@ fn sha1() -> sha1 {
|
|||
fn mk_result(st: sha1state) -> ~[u8] {
|
||||
if !st.computed { pad_msg(st); st.computed = true; }
|
||||
let mut rs: ~[u8] = ~[];
|
||||
for vec::each(st.h) |hpart| {
|
||||
for vec::each_mut(st.h) |ptr_hpart| {
|
||||
let hpart = *ptr_hpart;
|
||||
let a = (hpart >> 24u32 & 0xFFu32) as u8;
|
||||
let b = (hpart >> 16u32 & 0xFFu32) as u8;
|
||||
let c = (hpart >> 8u32 & 0xFFu32) as u8;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue