Skip to content

Commit 107800b

Browse files
committed
refactor: ef and tf's f32 conversion function to unwrap_or_default()
1 parent bcd4549 commit 107800b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,8 @@ impl eframe::App for AV1Studio {
352352
}
353353

354354
let (ef, tf) = (
355-
self.encoded_frames.unwrap_or(0),
356-
self.total_frames.unwrap_or(0),
355+
self.encoded_frames.unwrap_or_default(),
356+
self.total_frames.unwrap_or_default(),
357357
);
358358
let progress = if tf == 0 { 0.0 } else { ef as f32 / tf as f32 };
359359
ui.add(ProgressBar::new(progress).show_percentage());

0 commit comments

Comments
 (0)