I have my struct which looks like this:
struct Example<'s> {
current_state: &'s State
state_table: Box<[State]>
}```
and a function to generate this struct that takes in a state table and references the first element as its current state.
```rs
impl Example<'_> {
fn new(state_table: Box<[State]>) {
Example {
current_state: &state_table[0],
state_table
}
}
}```
Obviously, this code does not compile because I am referencing `table` which will be dropped. Is there any way I can instead reference the `Example`'s own `state_table`?