diff --git a/pumpkin-inventory/src/lib.rs b/pumpkin-inventory/src/lib.rs index a019c298c..ff6c2a429 100644 --- a/pumpkin-inventory/src/lib.rs +++ b/pumpkin-inventory/src/lib.rs @@ -61,7 +61,7 @@ impl WindowType { } // Container needs Sync + Send to be able to be in async Server pub trait Container: Sync + Send { - fn window_type(&self) -> &WindowType; + fn window_type(&self) -> &'static WindowType; fn handle_item_change( &mut self, @@ -189,7 +189,7 @@ impl<'a> OptionallyCombinedContainer<'a> { } impl<'a> Container for OptionallyCombinedContainer<'a> { - fn window_type(&self) -> &WindowType { + fn window_type(&self) -> &'static WindowType { if let Some(container) = &self.container { container.window_type() } else { diff --git a/pumpkin-inventory/src/open_container.rs b/pumpkin-inventory/src/open_container.rs index 895f92f08..f5a361b2b 100644 --- a/pumpkin-inventory/src/open_container.rs +++ b/pumpkin-inventory/src/open_container.rs @@ -53,7 +53,7 @@ impl Chest { } } impl Container for Chest { - fn window_type(&self) -> &WindowType { + fn window_type(&self) -> &'static WindowType { &WindowType::Generic9x3 }