@@ -25,7 +25,10 @@ mod tests {
2525 } ;
2626
2727 let registry = default_registry ( ) ;
28- let result = registry. decode ( & BoxKey :: FourCC ( FourCC ( * b"stts" ) ) , & mut cursor, & header) . unwrap ( ) . unwrap ( ) ;
28+ let result = registry
29+ . decode ( & BoxKey :: FourCC ( FourCC ( * b"stts" ) ) , & mut cursor, & header)
30+ . unwrap ( )
31+ . unwrap ( ) ;
2932
3033 match result {
3134 BoxValue :: Structured ( StructuredData :: DecodingTimeToSample ( stts_data) ) => {
@@ -65,7 +68,10 @@ mod tests {
6568 } ;
6669
6770 let registry = default_registry ( ) ;
68- let result = registry. decode ( & BoxKey :: FourCC ( FourCC ( * b"stsz" ) ) , & mut cursor, & header) . unwrap ( ) . unwrap ( ) ;
71+ let result = registry
72+ . decode ( & BoxKey :: FourCC ( FourCC ( * b"stsz" ) ) , & mut cursor, & header)
73+ . unwrap ( )
74+ . unwrap ( ) ;
6975
7076 match result {
7177 BoxValue :: Structured ( StructuredData :: SampleSize ( stsz_data) ) => {
@@ -106,7 +112,10 @@ mod tests {
106112 } ;
107113
108114 let registry = default_registry ( ) ;
109- let result = registry. decode ( & BoxKey :: FourCC ( FourCC ( * b"stsc" ) ) , & mut cursor, & header) . unwrap ( ) . unwrap ( ) ;
115+ let result = registry
116+ . decode ( & BoxKey :: FourCC ( FourCC ( * b"stsc" ) ) , & mut cursor, & header)
117+ . unwrap ( )
118+ . unwrap ( ) ;
110119
111120 match result {
112121 BoxValue :: Structured ( StructuredData :: SampleToChunk ( stsc_data) ) => {
@@ -132,12 +141,12 @@ mod tests {
132141 // Create mock CTTS box data (without version/flags)
133142 let mock_data = vec ! [
134143 0 , 0 , 0 , 3 , // entry_count = 3
135- 0 , 0 , 0 , 5 , // sample_count = 5
136- 0 , 0 , 1 , 0 , // sample_offset = 256
137- 0 , 0 , 0 , 2 , // sample_count = 2
144+ 0 , 0 , 0 , 5 , // sample_count = 5
145+ 0 , 0 , 1 , 0 , // sample_offset = 256
146+ 0 , 0 , 0 , 2 , // sample_count = 2
138147 255 , 255 , 255 , 0 , // sample_offset = -256 (signed)
139- 0 , 0 , 0 , 1 , // sample_count = 1
140- 0 , 0 , 2 , 0 , // sample_offset = 512
148+ 0 , 0 , 0 , 1 , // sample_count = 1
149+ 0 , 0 , 2 , 0 , // sample_offset = 512
141150 ] ;
142151
143152 let mut cursor = Cursor :: new ( mock_data) ;
@@ -150,7 +159,10 @@ mod tests {
150159 } ;
151160
152161 let registry = default_registry ( ) ;
153- let result = registry. decode ( & BoxKey :: FourCC ( FourCC ( * b"ctts" ) ) , & mut cursor, & header) . unwrap ( ) . unwrap ( ) ;
162+ let result = registry
163+ . decode ( & BoxKey :: FourCC ( FourCC ( * b"ctts" ) ) , & mut cursor, & header)
164+ . unwrap ( )
165+ . unwrap ( ) ;
154166
155167 match result {
156168 BoxValue :: Structured ( StructuredData :: CompositionTimeToSample ( ctts_data) ) => {
@@ -193,7 +205,10 @@ mod tests {
193205 } ;
194206
195207 let registry = default_registry ( ) ;
196- let result = registry. decode ( & BoxKey :: FourCC ( FourCC ( * b"stss" ) ) , & mut cursor, & header) . unwrap ( ) . unwrap ( ) ;
208+ let result = registry
209+ . decode ( & BoxKey :: FourCC ( FourCC ( * b"stss" ) ) , & mut cursor, & header)
210+ . unwrap ( )
211+ . unwrap ( ) ;
197212
198213 match result {
199214 BoxValue :: Structured ( StructuredData :: SyncSample ( stss_data) ) => {
@@ -231,7 +246,10 @@ mod tests {
231246 } ;
232247
233248 let registry = default_registry ( ) ;
234- let result = registry. decode ( & BoxKey :: FourCC ( FourCC ( * b"stco" ) ) , & mut cursor, & header) . unwrap ( ) . unwrap ( ) ;
249+ let result = registry
250+ . decode ( & BoxKey :: FourCC ( FourCC ( * b"stco" ) ) , & mut cursor, & header)
251+ . unwrap ( )
252+ . unwrap ( ) ;
235253
236254 match result {
237255 BoxValue :: Structured ( StructuredData :: ChunkOffset ( stco_data) ) => {
@@ -267,7 +285,10 @@ mod tests {
267285 } ;
268286
269287 let registry = default_registry ( ) ;
270- let result = registry. decode ( & BoxKey :: FourCC ( FourCC ( * b"co64" ) ) , & mut cursor, & header) . unwrap ( ) . unwrap ( ) ;
288+ let result = registry
289+ . decode ( & BoxKey :: FourCC ( FourCC ( * b"co64" ) ) , & mut cursor, & header)
290+ . unwrap ( )
291+ . unwrap ( ) ;
271292
272293 match result {
273294 BoxValue :: Structured ( StructuredData :: ChunkOffset64 ( co64_data) ) => {
@@ -296,18 +317,15 @@ mod tests {
296317 0 , 0 , // pre_defined
297318 0 , 0 , // reserved
298319 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , // pre_defined[3]
299- 0 , 0 , 0 , 0 ,
300- 7 , 128 , // width = 1920
301- 4 , 56 , // height = 1080
320+ 0 , 0 , 0 , 0 , 7 , 128 , // width = 1920
321+ 4 , 56 , // height = 1080
302322 0 , 72 , 0 , 0 , // horizresolution = 72 dpi
303323 0 , 72 , 0 , 0 , // vertresolution = 72 dpi
304324 0 , 0 , 0 , 0 , // reserved
305325 0 , 1 , // frame_count = 1
306326 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , // compressorname (32 bytes)
307- 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
308- 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
309- 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
310- 0 , 24 , // depth = 24
327+ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
328+ 24 , // depth = 24
311329 255 , 255 , // pre_defined
312330 ] ;
313331
@@ -321,7 +339,10 @@ mod tests {
321339 } ;
322340
323341 let registry = default_registry ( ) ;
324- let result = registry. decode ( & BoxKey :: FourCC ( FourCC ( * b"stsd" ) ) , & mut cursor, & header) . unwrap ( ) . unwrap ( ) ;
342+ let result = registry
343+ . decode ( & BoxKey :: FourCC ( FourCC ( * b"stsd" ) ) , & mut cursor, & header)
344+ . unwrap ( )
345+ . unwrap ( ) ;
325346
326347 match result {
327348 BoxValue :: Structured ( StructuredData :: SampleDescription ( stsd_data) ) => {
@@ -352,8 +373,7 @@ mod tests {
352373 0 , 0 , 0 , 0 , 0 , 0 , // reserved
353374 0 , 1 , // data_reference_index = 1
354375 0 , 0 , 0 , 0 , // reserved[2]
355- 0 , 0 , 0 , 0 ,
356- 0 , 2 , // channelcount = 2 (stereo)
376+ 0 , 0 , 0 , 0 , 0 , 2 , // channelcount = 2 (stereo)
357377 0 , 16 , // samplesize = 16 bits
358378 0 , 0 , // pre_defined
359379 0 , 0 , // reserved
@@ -370,7 +390,10 @@ mod tests {
370390 } ;
371391
372392 let registry = default_registry ( ) ;
373- let result = registry. decode ( & BoxKey :: FourCC ( FourCC ( * b"stsd" ) ) , & mut cursor, & header) . unwrap ( ) . unwrap ( ) ;
393+ let result = registry
394+ . decode ( & BoxKey :: FourCC ( FourCC ( * b"stsd" ) ) , & mut cursor, & header)
395+ . unwrap ( )
396+ . unwrap ( ) ;
374397
375398 match result {
376399 BoxValue :: Structured ( StructuredData :: SampleDescription ( stsd_data) ) => {
0 commit comments