mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -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:
@@ -88,7 +88,11 @@ impl TextureAtlas {
|
||||
|
||||
// Make the top left pixel fully white for `WHITE_UV`, i.e. painting something with solid color:
|
||||
let (pos, image) = atlas.allocate((1, 1));
|
||||
assert_eq!(pos, (0, 0));
|
||||
assert_eq!(
|
||||
pos,
|
||||
(0, 0),
|
||||
"Expected the first allocation to be at (0, 0), but was at {pos:?}"
|
||||
);
|
||||
image[pos] = 1.0;
|
||||
|
||||
// Allocate a series of anti-aliased discs used to render small filled circles:
|
||||
|
||||
Reference in New Issue
Block a user