We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
gix-hash
1 parent c17aee6 commit 201e853Copy full SHA for 201e853
gix-odb/src/store_impls/loose/mod.rs
@@ -42,10 +42,9 @@ impl Store {
42
43
fn hash_path(id: &gix_hash::oid, mut root: PathBuf) -> PathBuf {
44
let mut hex = gix_hash::Kind::hex_buf();
45
- let hex_len = id.hex_to_buf(hex.as_mut());
46
- let buf = std::str::from_utf8(&hex[..hex_len]).expect("ascii only in hex");
47
- root.push(&buf[..2]);
48
- root.push(&buf[2..]);
+ let hex = id.hex_to_buf(hex.as_mut());
+ root.push(&hex[..2]);
+ root.push(&hex[2..]);
49
root
50
}
51
0 commit comments