rename iter_file_details -> iter_file_details_ext

This commit is contained in:
Igor Katson 2024-10-14 15:00:59 +01:00
parent af0389de05
commit abce0c6629
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
3 changed files with 3 additions and 3 deletions

View file

@ -1141,7 +1141,7 @@ impl Session {
let lengths = Lengths::from_torrent(&info)?; let lengths = Lengths::from_torrent(&info)?;
let file_infos = info let file_infos = info
.iter_file_details(&lengths)? .iter_file_details_ext(&lengths)?
.map(|fd| { .map(|fd| {
Ok::<_, anyhow::Error>(FileInfo { Ok::<_, anyhow::Error>(FileInfo {
relative_filename: fd.filename.to_pathbuf()?, relative_filename: fd.filename.to_pathbuf()?,

View file

@ -151,7 +151,7 @@ impl TorrentStorage for FilesystemStorage {
fn init(&mut self, meta: &ManagedTorrentShared) -> anyhow::Result<()> { fn init(&mut self, meta: &ManagedTorrentShared) -> anyhow::Result<()> {
let mut files = Vec::<OpenedFile>::new(); let mut files = Vec::<OpenedFile>::new();
for file_details in meta.info.iter_file_details(&meta.lengths)? { for file_details in meta.info.iter_file_details_ext(&meta.lengths)? {
let mut full_path = self.output_folder.clone(); let mut full_path = self.output_folder.clone();
let relative_path = file_details let relative_path = file_details
.filename .filename

View file

@ -240,7 +240,7 @@ impl<BufType: AsRef<[u8]>> TorrentMetaV1Info<BufType> {
// NOTE: lenghts MUST be construced with Lenghts::from_torrent, otherwise // NOTE: lenghts MUST be construced with Lenghts::from_torrent, otherwise
// the yielded results will be garbage. // the yielded results will be garbage.
pub fn iter_file_details<'a>( pub fn iter_file_details_ext<'a>(
&'a self, &'a self,
lengths: &'a Lengths, lengths: &'a Lengths,
) -> anyhow::Result<impl Iterator<Item = FileDetails<'a, BufType>> + 'a> { ) -> anyhow::Result<impl Iterator<Item = FileDetails<'a, BufType>> + 'a> {