Skip to content

Commit 19589fc

Browse files
committed
Remove cross borrowing from mut Box<T> to &mut T.
Reference: rust-lang/rust#15171. Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
1 parent e30e139 commit 19589fc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: src/rust-crypto/sha2.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ mod tests {
820820

821821
let mut sh = box Sha512::new();
822822

823-
test_hash(sh, tests.as_slice());
823+
test_hash(&mut *sh, tests.as_slice());
824824
}
825825

826826
#[test]
@@ -845,7 +845,7 @@ mod tests {
845845

846846
let mut sh = box Sha384::new();
847847

848-
test_hash(sh, tests.as_slice());
848+
test_hash(&mut *sh, tests.as_slice());
849849
}
850850

851851
#[test]
@@ -870,7 +870,7 @@ mod tests {
870870

871871
let mut sh = box Sha512Trunc256::new();
872872

873-
test_hash(sh, tests.as_slice());
873+
test_hash(&mut *sh, tests.as_slice());
874874
}
875875

876876
#[test]
@@ -895,7 +895,7 @@ mod tests {
895895

896896
let mut sh = box Sha512Trunc224::new();
897897

898-
test_hash(sh, tests.as_slice());
898+
test_hash(&mut *sh, tests.as_slice());
899899
}
900900

901901
#[test]
@@ -920,7 +920,7 @@ mod tests {
920920

921921
let mut sh = box Sha256::new();
922922

923-
test_hash(sh, tests.as_slice());
923+
test_hash(&mut *sh, tests.as_slice());
924924
}
925925

926926
#[test]
@@ -945,7 +945,7 @@ mod tests {
945945

946946
let mut sh = box Sha224::new();
947947

948-
test_hash(sh, tests.as_slice());
948+
test_hash(&mut *sh, tests.as_slice());
949949
}
950950

951951
#[test]

0 commit comments

Comments
 (0)