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:
parent
a6f1d280b5
commit
efefcc4735
|
@ -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);
|
||||
|
||||
|
|
|
@ -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> {
|
||||
|
|
Loading…
Reference in a new issue