1- use crate :: error:: { AudioError , Result } ;
21use crate :: err;
2+ use crate :: error:: { AudioError , Result } ;
33
44use std:: io:: Read ;
55
@@ -157,8 +157,9 @@ where
157157 }
158158 } ,
159159 TextEncoding :: UTF16BE => utf16_decode_bytes ( raw_bytes. as_slice ( ) , u16:: from_be_bytes) ?,
160- TextEncoding :: UTF8 => utf8_decode ( raw_bytes)
161- . map_err ( |_| AudioError :: TextDecode ( "Expected a UTF-8 string" ) ) ?,
160+ TextEncoding :: UTF8 => {
161+ utf8_decode ( raw_bytes) . map_err ( |_| AudioError :: TextDecode ( "Expected a UTF-8 string" ) ) ?
162+ } ,
162163 } ;
163164
164165 Ok ( DecodeTextResult {
@@ -356,7 +357,7 @@ mod tests {
356357 ] ,
357358 u16:: from_be_bytes,
358359 )
359- . unwrap ( ) ;
360+ . unwrap ( ) ;
360361
361362 assert_eq ! ( utf16_decode, TEST_STRING . to_string( ) ) ;
362363
@@ -367,14 +368,14 @@ mod tests {
367368 ] ) ,
368369 TextDecodeOptions :: new ( ) . encoding ( TextEncoding :: UTF16 ) ,
369370 )
370- . unwrap ( ) ;
371+ . unwrap ( ) ;
371372 let le_utf16_decode = super :: decode_text (
372373 & mut Cursor :: new ( & [
373374 0xFF , 0xFE , 0x6C , 0x00 , 0xF8 , 0x00 , 0x66 , 0x00 , 0x74 , 0x00 , 0xA5 , 0x00 , 0x00 , 0x00 ,
374375 ] ) ,
375376 TextDecodeOptions :: new ( ) . encoding ( TextEncoding :: UTF16 ) ,
376377 )
377- . unwrap ( ) ;
378+ . unwrap ( ) ;
378379
379380 assert_eq ! ( be_utf16_decode. content, le_utf16_decode. content) ;
380381 assert_eq ! ( be_utf16_decode. bytes_read, le_utf16_decode. bytes_read) ;
@@ -384,7 +385,7 @@ mod tests {
384385 & mut TEST_STRING . as_bytes ( ) ,
385386 TextDecodeOptions :: new ( ) . encoding ( TextEncoding :: UTF8 ) ,
386387 )
387- . unwrap ( ) ;
388+ . unwrap ( ) ;
388389
389390 assert_eq ! ( utf8_decode. content, TEST_STRING . to_string( ) ) ;
390391 }
0 commit comments