提交 ca3a9f83 编写于 作者: T Tim Chevalier

Annotate more FIXMES in libstd (comments only)

上级 f029e1f4
......@@ -14,7 +14,7 @@
}
// FIXME eventually, a proper datatype plus an exported impl would be
// preferrable
// preferrable (#2343)
fn create<T: copy>() -> t<T> {
type cell<T> = option<T>;
......
......@@ -66,7 +66,7 @@
}
// FIXME: package this up and export it as a datatype usable for
// external code that doesn't want to pay the cost of a box.
// external code that doesn't want to pay the cost of a box. (#2344)
mod chained {
type entry<K, V> = {
hash: uint,
......
......@@ -61,7 +61,7 @@ fn sha1() -> sha1 {
work_buf: [mut u32]};
fn add_input(st: sha1state, msg: [u8]) {
// FIXME: Should be typestate precondition
/* FIXME: Should be typestate precondition (#2345) */
assert (!st.computed);
for vec::each(msg) {|element|
st.msg_block[st.msg_block_idx] = element;
......@@ -70,7 +70,7 @@ fn add_input(st: sha1state, msg: [u8]) {
if st.len_low == 0u32 {
st.len_high += 1u32;
if st.len_high == 0u32 {
// FIXME: Need better failure mode
// FIXME: Need better failure mode (#2346)
fail;
}
......@@ -79,7 +79,7 @@ fn add_input(st: sha1state, msg: [u8]) {
}
}
fn process_msg_block(st: sha1state) {
// FIXME: Make precondition
// FIXME: Make precondition (#2345)
assert (vec::len(st.h) == digest_buf_len);
assert (vec::len(st.work_buf) == work_buf_len);
let mut t: int; // Loop counter
......@@ -181,7 +181,7 @@ fn mk_result(st: sha1state) -> [u8] {
* can be assumed that the message digest has been computed.
*/
fn pad_msg(st: sha1state) {
// FIXME: Should be a precondition
// FIXME: Should be a precondition (#2345)
assert (vec::len(st.msg_block) == msg_block_len);
/*
......@@ -220,7 +220,7 @@ fn pad_msg(st: sha1state) {
impl of sha1 for sha1state {
fn reset() {
// FIXME: Should be typestate precondition
// FIXME: Should be typestate precondition (#2345)
assert (vec::len(self.h) == digest_buf_len);
self.len_low = 0u32;
self.len_high = 0u32;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册