Skip to content

Commit 8c15092

Browse files
committed
f 2 * len
1 parent f9435a6 commit 8c15092

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hex_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub fn to_vec(hex: &str) -> Option<Vec<u8>> {
2424

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

0 commit comments

Comments
 (0)