From fbc21da9132841532d388a929b0257f039716af7 Mon Sep 17 00:00:00 2001 From: RumovZ Date: Thu, 31 Mar 2022 12:53:36 +0200 Subject: [PATCH] =?UTF-8?q?ExportData=20=E2=86=92=20ExchangeData?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rslib/src/import_export/gather.rs | 4 ++-- rslib/src/import_export/insert.rs | 4 ++-- rslib/src/import_export/package/apkg/export.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rslib/src/import_export/gather.rs b/rslib/src/import_export/gather.rs index a1e80e42d..eaf5cf6ae 100644 --- a/rslib/src/import_export/gather.rs +++ b/rslib/src/import_export/gather.rs @@ -18,7 +18,7 @@ use crate::{ }; #[derive(Debug, Default)] -pub(super) struct ExportData { +pub(super) struct ExchangeData { pub(super) decks: Vec, pub(super) notes: Vec, pub(super) cards: Vec, @@ -28,7 +28,7 @@ pub(super) struct ExportData { pub(super) media_paths: HashSet, } -impl ExportData { +impl ExchangeData { pub(super) fn gather_data( &mut self, col: &mut Collection, diff --git a/rslib/src/import_export/insert.rs b/rslib/src/import_export/insert.rs index a4ae670f5..c0ea57de0 100644 --- a/rslib/src/import_export/insert.rs +++ b/rslib/src/import_export/insert.rs @@ -1,11 +1,11 @@ // Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -use super::gather::ExportData; +use super::gather::ExchangeData; use crate::{prelude::*, revlog::RevlogEntry}; impl Collection { - pub(super) fn insert_data(&mut self, data: &ExportData) -> Result<()> { + pub(super) fn insert_data(&mut self, data: &ExchangeData) -> Result<()> { self.insert_decks(&data.decks)?; self.insert_notes(&data.notes)?; self.insert_cards(&data.cards)?; diff --git a/rslib/src/import_export/package/apkg/export.rs b/rslib/src/import_export/package/apkg/export.rs index 918cdbea7..5372bfede 100644 --- a/rslib/src/import_export/package/apkg/export.rs +++ b/rslib/src/import_export/package/apkg/export.rs @@ -11,7 +11,7 @@ use tempfile::NamedTempFile; use crate::{ collection::CollectionBuilder, import_export::{ - gather::ExportData, + gather::ExchangeData, package::{ colpkg::export::{export_collection, MediaIter}, Meta, @@ -70,7 +70,7 @@ impl Collection { with_scheduling: bool, with_media: bool, ) -> Result> { - let mut data = ExportData::default(); + let mut data = ExchangeData::default(); data.gather_data(self, search, with_scheduling)?; if with_media { data.gather_media_paths();