File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 09bb07bed9166105ea961a42b5fff7739ae0d2e9
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
5
- refs/heads/try: 392708e3b153eb9f7cd3bf10d1658c76b49632a7
5
+ refs/heads/try: ae69c2fc7d8996777c41455758343a99efed0f34
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ use core::vec;
37
37
/// The SHA-1 interface
38
38
trait Sha1 {
39
39
/// Provide message input as bytes
40
- fn input ( ( & [ u8 ] ) ) ;
40
+ fn input ( ( & [ const u8 ] ) ) ;
41
41
/// Provide message input as string
42
42
fn input_str ( ( & str ) ) ;
43
43
/**
@@ -75,9 +75,9 @@ pub fn sha1() -> Sha1 {
75
75
mut computed : bool ,
76
76
work_buf : @~[ mut u32] } ;
77
77
78
- fn add_input ( st : & Sha1State , msg : & [ u8 ] ) {
78
+ fn add_input ( st : & Sha1State , msg : & [ const u8 ] ) {
79
79
assert ( !st. computed ) ;
80
- for vec:: each ( msg) |element| {
80
+ for vec:: each_const ( msg) |element| {
81
81
st. msg_block [ st. msg_block_idx ] = * element;
82
82
st. msg_block_idx += 1 u;
83
83
st. len_low += 8u32 ;
@@ -243,7 +243,7 @@ pub fn sha1() -> Sha1 {
243
243
self . h [ 4 ] = 0xC3D2E1F0u32 ;
244
244
self . computed = false ;
245
245
}
246
- fn input ( msg : & [ u8 ] ) { add_input ( & self , msg) ; }
246
+ fn input ( msg : & [ const u8 ] ) { add_input ( & self , msg) ; }
247
247
fn input_str ( msg : & str ) {
248
248
let bs = str:: to_bytes ( msg) ;
249
249
add_input ( & self , bs) ;
You can’t perform that action at this time.
0 commit comments