This repository was archived by the owner on Sep 3, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed
Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -312,10 +312,10 @@ impl ChunkHeader {
312312 ///
313313 /// # Arguments
314314 ///
315- /// * `reader` - The input stream. The reader must be positioned right after the root
316- /// chunk header.
317- /// * `end` - The stream position where the chunk sequence ends. This is used to
318- /// prevent searching past the end.
315+ /// * `reader`: The input stream. The reader must be positioned right after the root chunk
316+ /// header.
317+ /// * `end`: The stream position where the chunk sequence ends. This is used to prevent
318+ /// searching past the end.
319319 pub fn find_id3 < F , R > ( reader : R , end : u64 ) -> crate :: Result < Self >
320320 where
321321 F : ChunkFormat ,
@@ -329,11 +329,11 @@ impl ChunkHeader {
329329 ///
330330 /// # Arguments
331331 ///
332- /// * `tag` - The chunk tag to search for.
333- /// * `reader` - The input stream. The reader must be positioned at the start of a
334- /// sequence of chunks.
335- /// * `end` - The stream position where the chunk sequence ends. This is used to
336- /// prevent searching past the end.
332+ /// * `tag`: The chunk tag to search for.
333+ /// * `reader`: The input stream. The reader must be positioned at the start of a sequence of
334+ /// chunks.
335+ /// * `end`: The stream position where the chunk sequence ends. This is used to prevent
336+ /// searching past the end.
337337 fn find < F , R > ( tag : & ChunkTag , mut reader : R , end : u64 ) -> crate :: Result < Option < Self > >
338338 where
339339 F : ChunkFormat ,
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use bitflags::bitflags;
88use byteorder:: { BigEndian , ByteOrder , WriteBytesExt } ;
99use std:: cmp;
1010use std:: fs;
11- use std:: io:: { self , Read , Write } ;
11+ use std:: io:: { self , Read , Seek , Write } ;
1212use std:: ops:: Range ;
1313use std:: path:: Path ;
1414
@@ -479,7 +479,9 @@ impl Default for Encoder {
479479 }
480480}
481481
482- pub fn locate_id3v2 ( mut reader : impl io:: Read + io:: Seek ) -> crate :: Result < Range < u64 > > {
482+ pub fn locate_id3v2 ( reader : impl io:: Read + io:: Seek ) -> crate :: Result < Range < u64 > > {
483+ let mut reader = io:: BufReader :: new ( reader) ;
484+
483485 let header = Header :: decode ( & mut reader) ?;
484486
485487 let tag_size = header. tag_size ( ) ;
You can’t perform that action at this time.
0 commit comments