File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
crates/recrypt-storage/src Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -96,10 +96,10 @@ impl ChunkStorage for LocalFileStorage {
9696
9797 let mut entries = fs:: read_dir ( & chunks_dir) . await ?;
9898 while let Some ( entry) = entries. next_entry ( ) . await ? {
99- if let Some ( name) = entry. file_name ( ) . to_str ( ) {
100- if let Some ( hash) = hash_from_base58 ( name) {
101- hashes . push ( hash ) ;
102- }
99+ if let Some ( name) = entry. file_name ( ) . to_str ( )
100+ && let Some ( hash) = hash_from_base58 ( name)
101+ {
102+ hashes . push ( hash ) ;
103103 }
104104 }
105105
Original file line number Diff line number Diff line change @@ -230,10 +230,10 @@ impl ChunkStorage for S3Storage {
230230 for obj in contents {
231231 if let Some ( key) = obj. key {
232232 // Extract hash from key: "chunks/b3/{hash_base58}"
233- if let Some ( hash_b58) = key. strip_prefix ( & full_prefix) {
234- if let Some ( hash) = hash_from_base58 ( hash_b58) {
235- hashes . push ( hash ) ;
236- }
233+ if let Some ( hash_b58) = key. strip_prefix ( & full_prefix)
234+ && let Some ( hash) = hash_from_base58 ( hash_b58)
235+ {
236+ hashes . push ( hash ) ;
237237 }
238238 }
239239 }
You can’t perform that action at this time.
0 commit comments