Skip to content

Commit a6f9776

Browse files
committed
fmt
Signed-off-by: Serial <[email protected]>
1 parent a08a7c8 commit a6f9776

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/mp4/ilst/read.rs

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use super::constants::{
22
BE_SIGNED_INTEGER, BE_UNSIGNED_INTEGER, BMP, JPEG, PNG, RESERVED, UTF16, UTF8,
33
};
44
use super::{Atom, AtomData, AtomIdent, Ilst};
5-
use crate::error::{Result, LoftyError};
5+
use crate::error::{LoftyError, Result};
66
use crate::id3::v1::constants::GENRES;
77
use crate::macros::{err, try_vec};
88
use crate::mp4::atom_info::AtomInfo;
@@ -144,16 +144,15 @@ fn parse_data<R>(
144144
where
145145
R: Read + Seek,
146146
{
147-
let handle_error =
148-
|err: LoftyError, parsing_mode: ParsingMode| -> Result<()> {
149-
match parsing_mode {
150-
ParsingMode::Strict => Err(err),
151-
ParsingMode::BestAttempt | ParsingMode::Relaxed => {
152-
log::warn!("Skipping atom with invalid content: {}", err);
153-
Ok(())
154-
},
155-
}
156-
};
147+
let handle_error = |err: LoftyError, parsing_mode: ParsingMode| -> Result<()> {
148+
match parsing_mode {
149+
ParsingMode::Strict => Err(err),
150+
ParsingMode::BestAttempt | ParsingMode::Relaxed => {
151+
log::warn!("Skipping atom with invalid content: {}", err);
152+
Ok(())
153+
},
154+
}
155+
};
157156

158157
if let Some(mut atom_data) = parse_data_inner(reader, parsing_mode, &atom_info)? {
159158
// Most atoms we encounter are only going to have 1 value, so store them as such
@@ -178,7 +177,7 @@ where
178177
Ok(data) => data,
179178
Err(err) => return handle_error(err, parsing_mode),
180179
};
181-
180+
182181
data.push(value);
183182
}
184183

0 commit comments

Comments
 (0)