summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiogo464 <[email protected]>2025-08-08 19:28:08 +0100
committerdiogo464 <[email protected]>2025-08-08 19:28:08 +0100
commit39b606a604c4508b0fb63a79973df158e4b34f93 (patch)
tree7e6df89eb56101745f085eccbb976aa77405f85d
parentfb701e68633189a14594c66300a06b51ffd74711 (diff)
updated hex dependency
-rw-r--r--fctdrive/Cargo.lock2
-rw-r--r--fctdrive/src/main.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/fctdrive/Cargo.lock b/fctdrive/Cargo.lock
index 9642104..102daaf 100644
--- a/fctdrive/Cargo.lock
+++ b/fctdrive/Cargo.lock
@@ -171,7 +171,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
171[[package]] 171[[package]]
172name = "hex" 172name = "hex"
173version = "1.1.0" 173version = "1.1.0"
174source = "git+https://git.d464.sh/hex-rs#ed091ffa8206658262a0e2409a35d8910e5d0682" 174source = "git+https://git.d464.sh/hex-rs#0b673e5f5d0410d397f5ad3adb6af15efe57dedd"
175 175
176[[package]] 176[[package]]
177name = "is_terminal_polyfill" 177name = "is_terminal_polyfill"
diff --git a/fctdrive/src/main.rs b/fctdrive/src/main.rs
index 4f8f85f..78b3a28 100644
--- a/fctdrive/src/main.rs
+++ b/fctdrive/src/main.rs
@@ -43,7 +43,7 @@ impl FromStr for BlobId {
43 type Err = InvalidBlobId; 43 type Err = InvalidBlobId;
44 44
45 fn from_str(s: &str) -> Result<Self, Self::Err> { 45 fn from_str(s: &str) -> Result<Self, Self::Err> {
46 let decoded = hex::decode_hex(s).map_err(|_| InvalidBlobId)?; 46 let decoded = hex::decode(s).map_err(|_| InvalidBlobId)?;
47 Ok(Self(decoded.try_into().map_err(|_| InvalidBlobId)?)) 47 Ok(Self(decoded.try_into().map_err(|_| InvalidBlobId)?))
48 } 48 }
49} 49}
@@ -58,7 +58,7 @@ impl BlobStore {
58} 58}
59 59
60pub fn blob_path(store: &BlobStore, blob_id: &BlobId) -> PathBuf { 60pub fn blob_path(store: &BlobStore, blob_id: &BlobId) -> PathBuf {
61 let encoded = hex::encode_hex(blob_id.as_bytes()); 61 let encoded = hex::encode(blob_id.as_bytes());
62 let mut path = store.0.clone(); 62 let mut path = store.0.clone();
63 for depth in 0..BLOB_STORE_HIERARCHY_DEPTH { 63 for depth in 0..BLOB_STORE_HIERARCHY_DEPTH {
64 let base_idx = depth * 2; 64 let base_idx = depth * 2;