Skip to content

Commit 4e3fbfe

Browse files
committed
rust
1 parent 1a442ba commit 4e3fbfe

File tree

1 file changed

+5
-5
lines changed
  • src/datatrove/pipeline/dedup/fast_mh3/src

1 file changed

+5
-5
lines changed

src/datatrove/pipeline/dedup/fast_mh3/src/main.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,13 @@ async fn list_s3_files(client: &Client, s3_path: &S3Path, total_files: usize) ->
216216
.await
217217
.context("Failed to list S3 objects")?;
218218

219-
let files: Vec<String> = resp
220-
.contents()
221-
.map(|contents| contents.iter()
219+
let files: Vec<String> = match resp.contents() {
220+
Some(contents) => contents.iter()
222221
.filter_map(|obj| obj.key()
223222
.map(|key| format!("s3://{}/{}", s3_path.bucket, key)))
224-
.collect())
225-
.unwrap_or_else(Vec::new);
223+
.collect(),
224+
None => Vec::new(),
225+
};
226226

227227
if files.len() != total_files {
228228
anyhow::bail!(

0 commit comments

Comments
 (0)