diff options
author | Alex Auvolat <alex@adnab.me> | 2021-03-12 19:57:37 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-03-12 19:57:37 +0100 |
commit | c475471e7a8e7544f2be490898f4249cf27a17e9 (patch) | |
tree | 41253eaaba21b7d38340f2eab0ada17eaae88e8a /src/table/merkle.rs | |
parent | f4aad8fe6e36fe05e05c88c322b99fc87d896578 (diff) | |
download | garage-c475471e7a8e7544f2be490898f4249cf27a17e9.tar.gz garage-c475471e7a8e7544f2be490898f4249cf27a17e9.zip |
Implement table gc, currently for block_ref and version only
Diffstat (limited to 'src/table/merkle.rs')
-rw-r--r-- | src/table/merkle.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/table/merkle.rs b/src/table/merkle.rs index b04a2a88..7a0adba1 100644 --- a/src/table/merkle.rs +++ b/src/table/merkle.rs @@ -139,10 +139,7 @@ impl MerkleUpdater { let new_vhash = if vhash_by.len() == 0 { None } else { - let vhash_by: [u8; 32] = vhash_by - .try_into() - .map_err(|_| Error::Message(format!("Invalid value in Merkle todo table")))?; - Some(Hash::from(vhash_by)) + Some(Hash::try_from(&vhash_by[..]).unwrap()) }; let key = MerkleNodeKey { |