Skip to content

Commit

Permalink
f 2 * len
Browse files Browse the repository at this point in the history
  • Loading branch information
tnull committed Sep 14, 2022
1 parent f9435a6 commit 8c15092
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hex_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub fn to_vec(hex: &str) -> Option<Vec<u8>> {

#[inline]
pub fn to_string(value: &[u8]) -> String {
let mut res = String::with_capacity(value.len());
let mut res = String::with_capacity(2 * value.len());
for v in value {
write!(&mut res, "{:02x}", v).expect("Unable to write");
}
Expand Down

0 comments on commit 8c15092

Please sign in to comment.