Skip to content

Commit

Permalink
chore: do not print 0 to zero for perf
Browse files Browse the repository at this point in the history
  • Loading branch information
williamfzc committed Sep 8, 2024
1 parent d1a80fd commit 7d85179
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,11 @@ fn handle_relation(relation_cmd: RelationCommand) {

for related_file in &files {
let score = related_files_map.get(related_file).unwrap_or(&0);
row.push(score.to_string());
if score > &0 {
row.push(score.to_string());
} else {
row.push(String::new());
}

if symbol_wtr_opts.is_some() {
if score > &0 {
Expand Down

0 comments on commit 7d85179

Please sign in to comment.