improved error message when forgetting to call system apply function … (#13975)

fixes #13944
I literally just added `Did you forget to call SystemState::apply?` to
the error message. I tested it with the code snipped from the Issue and
yeah it works
This commit is contained in:
Wuketuke 2024-06-25 12:27:15 +00:00 committed by GitHub
parent 82fd3df719
commit 2d30ae437c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -312,7 +312,7 @@ impl RawCommandQueue {
impl Drop for CommandQueue {
fn drop(&mut self) {
if !self.bytes.is_empty() {
warn!("CommandQueue has un-applied commands being dropped.");
warn!("CommandQueue has un-applied commands being dropped. Did you forget to call SystemState::apply?");
}
// SAFETY: A reference is always a valid pointer
unsafe { self.get_raw().apply_or_drop_queued(None) };