warn instead of panic if there's already something assigned

I saw this trigger and couldn't repro; I want to understand it
better when it next occurs.
This commit is contained in:
Wez Furlong committed 2021-03-06 12:56:36 -08:00
1 parent 014acf1a4a
commit ac3ac43c2b
1 file changed
+10 -1
+10 -1
View File
@@ -83,7 +83,16 @@ where
prior_info.replace(info);
if glyph.texture.is_some() {
assert!(pos[idx].is_none());
if let Some(existing) = pos.get(idx) {
log::warn!(
"idx={} is already assigned to {:#?} in: {:#?}. infos={:#?}, glyphs={:#?}",
idx,
existing,
pos,
infos,
glyphs
);
}
let bitmap_pixel_width = glyph
.texture
.as_ref()