make window_type static in trait
This commit is contained in:
parent
1d065645e1
commit
d213fad067
@ -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 {
|
||||
|
||||
@ -53,7 +53,7 @@ impl Chest {
|
||||
}
|
||||
}
|
||||
impl Container for Chest {
|
||||
fn window_type(&self) -> &WindowType {
|
||||
fn window_type(&self) -> &'static WindowType {
|
||||
&WindowType::Generic9x3
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user