Fix confusing error message
This commit is contained in:
parent
3a72f2122a
commit
b804b25c21
2 changed files with 8 additions and 4 deletions
|
@ -134,7 +134,10 @@ where
|
|||
.layout(state, frame_state.as_mut().unwrap(), cx);
|
||||
}
|
||||
}
|
||||
_ => panic!("must call initialize before layout"),
|
||||
ElementRenderPhase::Start => panic!("must call initialize before layout"),
|
||||
ElementRenderPhase::LayoutRequested { .. } | ElementRenderPhase::Painted => {
|
||||
panic!("element rendered twice")
|
||||
}
|
||||
};
|
||||
|
||||
self.phase = ElementRenderPhase::LayoutRequested {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue