macro goodness
This commit is contained in:
@@ -52,7 +52,10 @@ pub trait HasUiState: Sized + 'static + HasUi {
|
||||
fn ui_state(&mut self) -> &mut UiState<Self>;
|
||||
fn ui_with_ui_state(&mut self) -> (&mut Ui<Self>, &mut UiState<Self>) {
|
||||
// as long as you're not doing anything actually unhinged this should always work safely
|
||||
(unsafe { std::mem::transmute(self.ui()) }, self.ui_state())
|
||||
(
|
||||
unsafe { std::mem::transmute::<&mut Ui<Self>, &mut Ui<Self>>(self.ui()) },
|
||||
self.ui_state(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user