Skip to content

Commit d3ccef0

Browse files
committed
fix: use derive default
1 parent dba81e4 commit d3ccef0

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/media_info.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,8 @@ pub fn get_media_info(input: &str) -> OutputMetadata {
4444
date: date.to_string(),
4545
title: extracted_filename.to_string(),
4646
file_name: media.name,
47-
frame_count: 0,
48-
frame_rate: 0.0,
49-
duration_seconds: 0.0,
50-
duration_human: "".to_string(),
5147
extension: extension.to_string(),
52-
width: 0,
53-
height: 0,
48+
..Default::default()
5449
};
5550

5651
for track in media.track {

src/metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ impl DurationSeconds {
2424
}
2525
}
2626

27-
#[derive(Serialize, Deserialize, Debug)]
27+
#[derive(Serialize, Deserialize, Debug, Default)]
2828
pub struct OutputMetadata {
2929
pub title: String,
3030
pub file_name: String,

0 commit comments

Comments
 (0)