export_collection_extracting_media() → ...

export_into_collection_file()
This commit is contained in:
RumovZ 2022-04-27 21:50:22 +02:00
parent 60c6869a05
commit 274afc7b3f

View file

@ -41,12 +41,8 @@ impl Collection {
.path() .path()
.to_str() .to_str()
.ok_or_else(|| AnkiError::IoError("tempfile with non-unicode name".into()))?; .ok_or_else(|| AnkiError::IoError("tempfile with non-unicode name".into()))?;
let data = self.export_collection_extracting_media( let data =
temp_col_path, self.export_into_collection_file(temp_col_path, search, with_scheduling, with_media)?;
search,
with_scheduling,
with_media,
)?;
let media = if let Some(media_fn) = media_fn { let media = if let Some(media_fn) = media_fn {
media_fn(data.media_paths) media_fn(data.media_paths)
@ -72,7 +68,7 @@ impl Collection {
Ok(data.notes.len()) Ok(data.notes.len())
} }
fn export_collection_extracting_media( fn export_into_collection_file(
&mut self, &mut self,
path: &str, path: &str,
search: impl TryIntoSearch, search: impl TryIntoSearch,