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
@@ -314,7 +314,7 @@ fn shape_perf_repeater_60_copies_1080p() {
|
||||
}
|
||||
let ms = t0.elapsed().as_secs_f64() * 1000.0 / n as f64;
|
||||
println!("shape_perf: 60-copy repeater at 1920x1080: {ms:.2} ms/frame");
|
||||
let ItemKind::Comp(comp) = &p.item(cid).unwrap().kind else { unreachable!() };
|
||||
let ItemKind::Comp(comp) = &p.item(cid).unwrap().kind else { panic!("not a composition") };
|
||||
let layer = &comp.layers[0];
|
||||
let ctx = crate::eval::EvalCtx::new(&p, cid, comp, Tick::ZERO);
|
||||
let contents = layer.props.sub("contents").unwrap();
|
||||
|
||||
Reference in New Issue
Block a user