Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Dec 17, 2024
1 parent 6ad32c1 commit 0ed80c1
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/core/src/index/revindex/disk_revindex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,12 @@ impl RevIndexOps for RevIndex {
.record_for_dataset(dataset_id)
.expect("dataset not found");

let mut name = row.name();
if name == "" {
name = row.filename();
}
if name == "" {
name = row.md5();
}
let name = [row.name(), row.filename(), row.md5()]
.into_iter()
.skip_while(|v| v.is_empty())
.next()
.unwrap(); // guaranteed to succeed because `md5` always exists

Some((name.into(), size))
} else {
None
Expand Down

0 comments on commit 0ed80c1

Please sign in to comment.