mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 22:00:03 -04:00
Add assert messages and print bad argument values in asserts (#5216)
Enabled the `missing_assert_message` lint * [x] I have followed the instructions in the PR template --------- Co-authored-by: Lucas Meurer <lucasmeurer96@gmail.com>
This commit is contained in:
@@ -111,7 +111,10 @@ impl AllocInfo {
|
||||
}
|
||||
|
||||
pub fn num_elements(&self) -> usize {
|
||||
assert!(self.element_size != ElementSize::Heterogenous);
|
||||
assert!(
|
||||
self.element_size != ElementSize::Heterogenous,
|
||||
"Heterogenous element size"
|
||||
);
|
||||
self.num_elements
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user