We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hex_decode
I'm not sure if the documentation is incorrect, or if the check itself is wrong.
The documentation for hex_decode states the following:
/// The length of dst must be src.len() / 2.
However, the function quietly allows for shorter decoding (though not longer decoding):
use faster_hex; // 0.8.1; pub fn main() { let mut dst: [u8; 2] = [0; 2]; faster_hex::hex_decode(b"aa", &mut dst).expect_err("aa"); faster_hex::hex_decode(b"aaaa", &mut dst).expect("aaaa"); faster_hex::hex_decode(b"aaaaaa", &mut dst).expect_err("aaaaaa"); }
The text was updated successfully, but these errors were encountered:
I think the documentation is wrong, it should be:
/// The length of `dst` must be at least `src.len() / 2`.
Sorry, something went wrong.
No branches or pull requests
I'm not sure if the documentation is incorrect, or if the check itself is wrong.
The documentation for
hex_decode
states the following:However, the function quietly allows for shorter decoding (though not longer decoding):
The text was updated successfully, but these errors were encountered: