Commit 6970ca20 authored by Kevin Ballard's avatar Kevin Ballard
Browse files

Update for 0.7

parent 9ff6dd59
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -109,7 +109,6 @@ mod tests {
    use super::*;
    use hex::FromHex;
    use hex::ToHex;
    use std::vec;

    struct HashTest {
        input: ~[u8],
@@ -152,7 +151,7 @@ mod tests {
            HashTest(~"A510CD18F7A56852EB0319", ~"577E216843DD11573574D3FB209B97D8"),
            HashTest(~"AAED18DBE8938C19ED734A8D", ~"6F80FB775F27E0A4CE5C2F42FC72C5F1")];

        for vec::each(tests) |test| {
        for tests.iter().advance |test| {
            hash_test(MD5, test);
        }
    }
@@ -164,7 +163,7 @@ mod tests {
            HashTest(~"616263", ~"A9993E364706816ABA3E25717850C26C9CD0D89D"),
            ];

        for vec::each(tests) |test| {
        for tests.iter().advance |test| {
            hash_test(SHA1, test);
        }
    }
@@ -175,7 +174,7 @@ mod tests {
            HashTest(~"616263", ~"BA7816BF8F01CFEA414140DE5DAE2223B00361A396177A9CB410FF61F20015AD")
            ];

        for vec::each(tests) |test| {
        for tests.iter().advance |test| {
            hash_test(SHA256, test);
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ impl<'self> FromHex for &'self str {
                else { fail!(~"bad hex character"); };

            if i % 2 == 0 {
                vec::push(&mut vec, nibble << 4);
                vec.push(nibble << 4);
            }
            else {
                vec[i/2] |= nibble;
+4 −4
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ impl PKey {
            f(self.evp, &ps)
        };

        vec::slice(s, 0u, r as uint).to_owned()
        s.slice(0u, r as uint).to_owned()
    }

    priv unsafe fn _fromstr(
@@ -256,7 +256,7 @@ impl PKey {
            if rv < 0 as c_int {
                ~[]
            } else {
                vec::slice(r, 0u, rv as uint).to_owned()
                r.slice(0u, rv as uint).to_owned()
            }
        }
    }
@@ -285,7 +285,7 @@ impl PKey {
            if rv < 0 as c_int {
                ~[]
            } else {
                vec::slice(r, 0u, rv as uint).to_owned()
                r.slice(0u, rv as uint).to_owned()
            }
        }
    }
@@ -334,7 +334,7 @@ impl PKey {
            if rv < 0 as c_int {
                ~[]
            } else {
                vec::slice(r, 0u, len as uint).to_owned()
                r.slice(0u, len as uint).to_owned()
            }
        }
    }
+2 −2
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ impl Crypter {
                    reslen
                };

                vec::slice(res, 0u, reslen as uint).to_owned()
                res.slice(0u, reslen as uint).to_owned()
            }
        }
    }
@@ -166,7 +166,7 @@ impl Crypter {
                reslen
            };

            vec::slice(res, 0u, reslen as uint).to_owned()
            res.slice(0u, reslen as uint).to_owned()
        }
    }
}