diff --git a/src/app.rs b/src/app.rs index 40c9e5a..2682492 100644 --- a/src/app.rs +++ b/src/app.rs @@ -287,7 +287,7 @@ impl MenuAction for Action { } #[derive(Clone, Debug)] -pub struct PreviewItem(pub tab::Item); +pub struct PreviewItem(pub Box); impl PartialEq for PreviewItem { fn eq(&self, other: &Self) -> bool { @@ -573,8 +573,8 @@ pub enum DialogPage { dir: bool, }, Replace { - from: tab::Item, - to: tab::Item, + from: Box, + to: Box, multiple: bool, apply_to_all: bool, conflict_count: usize, @@ -5205,7 +5205,7 @@ impl Application for App { Ok(item) => { self.context_page = ContextPage::Preview( None, - PreviewKind::Custom(PreviewItem(item)), + PreviewKind::Custom(PreviewItem(Box::new(item))), ); self.set_show_context(true); } diff --git a/src/operation/mod.rs b/src/operation/mod.rs index 886055a..c490655 100644 --- a/src/operation/mod.rs +++ b/src/operation/mod.rs @@ -34,7 +34,7 @@ async fn handle_replace( conflict_count: usize, ) -> ReplaceResult { let item_from = match tab::item_from_path(file_from, IconSizes::default()) { - Ok(ok) => ok, + Ok(ok) => Box::new(ok), Err(err) => { log::warn!("{err}"); return ReplaceResult::Cancel; @@ -42,7 +42,7 @@ async fn handle_replace( }; let item_to = match tab::item_from_path(file_to, IconSizes::default()) { - Ok(ok) => ok, + Ok(ok) => Box::new(ok), Err(err) => { log::warn!("{err}"); return ReplaceResult::Cancel; diff --git a/src/tab.rs b/src/tab.rs index 3fdd2fd..659aa6d 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -3587,7 +3587,7 @@ impl Tab { match item_from_path(&path, IconSizes::default()) { Ok(item) => { commands.push(Command::Preview(PreviewKind::Custom( - PreviewItem(item), + PreviewItem(Box::new(item)), ))); } Err(err) => {