1
0
Fork 0
mirror of https://github.com/alfg/mp4-rust.git synced 2024-06-11 09:29:21 +00:00

Ran clippy

This commit is contained in:
Luke Curley 2023-05-02 10:58:53 -07:00
parent a6f1d280b5
commit efefcc4735
2 changed files with 3 additions and 8 deletions

View file

@ -108,7 +108,7 @@ impl<R: Read + Seek> Mp4Reader<R> {
mvex.trexs
.iter()
.find(|trex| trex.track_id == track_id)
.and_then(|trex| Some(trex.default_sample_duration))
.map(|trex| trex.default_sample_duration)
})
.unwrap_or(0);

View file

@ -657,20 +657,15 @@ pub fn creation_time(creation_time: u64) -> u64 {
}
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Default)]
pub enum DataType {
#[default]
Binary = 0x000000,
Text = 0x000001,
Image = 0x00000D,
TempoCpil = 0x000015,
}
impl std::default::Default for DataType {
fn default() -> Self {
DataType::Binary
}
}
impl TryFrom<u32> for DataType {
type Error = Error;
fn try_from(value: u32) -> Result<DataType> {