Expect box future

This commit is contained in:
hodasemi 2024-08-26 13:48:39 +02:00
parent bdbbb4267e
commit 4db8aefed1

View file

@ -141,7 +141,7 @@ impl CharacterWindow {
engine: Arc<Engine>,
hero: Entity,
name: &str,
close: &'static dyn FutureStateChange,
close: Box<dyn FutureStateChange>,
) -> Result<Arc<Self>> {
let menu_gui =
GuiBuilder::from_str(engine.gui_handler(), include_str!("../resources/menu.xml"))?;
@ -153,7 +153,7 @@ impl CharacterWindow {
let close_button: Arc<Button> = menu_gui.element("close")?;
let character_window = Arc::new_cyclic(|me| CharacterWindow {
close: Box::new(close),
close,
menu_gui,
tab_content_grid: content_grid,