aboutsummaryrefslogtreecommitdiff
path: root/src/lib/sha1.rs
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2011-04-19 13:35:49 -0700
committerGraydon Hoare <[email protected]>2011-04-19 13:35:49 -0700
commitd2bd07dcb02783063375b6c8532fceaf9fa9d50f (patch)
treea253b5eadb140d14bc99d1456e316ce1e210a6be /src/lib/sha1.rs
parentrustc: Allow glue to be emitted even for scalar types; this is necessary to s... (diff)
downloadrust-d2bd07dcb02783063375b6c8532fceaf9fa9d50f.tar.xz
rust-d2bd07dcb02783063375b6c8532fceaf9fa9d50f.zip
Remove effect system from src.
Diffstat (limited to 'src/lib/sha1.rs')
-rw-r--r--src/lib/sha1.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/sha1.rs b/src/lib/sha1.rs
index 3899dddb..3866be1e 100644
--- a/src/lib/sha1.rs
+++ b/src/lib/sha1.rs
@@ -41,7 +41,7 @@ fn mk_sha1() -> sha1 {
mutable uint msg_block_idx,
mutable bool computed);
- impure fn add_input(&sha1state st, &vec[u8] msg) {
+ fn add_input(&sha1state st, &vec[u8] msg) {
// FIXME: Should be typestate precondition
check (!st.computed);
@@ -64,7 +64,7 @@ fn mk_sha1() -> sha1 {
}
}
- impure fn process_msg_block(&sha1state st) {
+ fn process_msg_block(&sha1state st) {
// FIXME: Make precondition
check (_vec.len[mutable u32](st.h) == digest_buf_len);
@@ -164,7 +164,7 @@ fn mk_sha1() -> sha1 {
ret (word << bits_hack) | (word >> (32u32 - bits));
}
- impure fn mk_result(&sha1state st) -> vec[u8] {
+ fn mk_result(&sha1state st) -> vec[u8] {
if (!st.computed) {
pad_msg(st);
st.computed = true;
@@ -190,7 +190,7 @@ fn mk_sha1() -> sha1 {
* call process_msg_block() appropriately. When it returns, it
* can be assumed that the message digest has been computed.
*/
- impure fn pad_msg(&sha1state st) {
+ fn pad_msg(&sha1state st) {
// FIXME: Should be a precondition
check (_vec.len[mutable u8](st.msg_block) == msg_block_len);