Never crash: render and gpu crates without panic!()
render: the debug-only quantisation check uses debug_assert! instead of panic!. gpu: the test-only panic on a wgpu validation error is cfg(test) with a narrow allow, and release builds only log. Test-only unreachable!() calls become panic!(). Denies the panic lints in both crates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
10644a83aa
commit
fe89ab9146
@@ -309,7 +309,7 @@ fn edits_invalidate_cached_layers() {
|
||||
(
|
||||
"solid colour",
|
||||
Box::new(|p, cid| {
|
||||
let LayerSource::Solid { item } = p.comp(cid).unwrap().layers[2].source else { unreachable!() };
|
||||
let LayerSource::Solid { item } = p.comp(cid).unwrap().layers[2].source else { panic!("not a solid layer") };
|
||||
if let ItemKind::Solid(s) = &mut p.item_mut(item).unwrap().kind {
|
||||
s.color = [0.9, 0.1, 0.1];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user