Fixing book example generation

This commit is contained in:
Jonathan Johnson 2024-09-05 20:47:07 -07:00
parent 634a4b7af8
commit a3c57d50d3
No known key found for this signature in database
GPG key ID: A66D6A34D6620579

View file

@ -135,6 +135,7 @@ impl Example {
where
Test: FnOnce(&mut AnimationRecorder<'_, Rgba8>),
{
self.recorder.refresh().expect("error refreshing recorder");
let mut animation = self.recorder.record_animated_png(60);
let capture = std::env::var("CAPTURE").is_ok();
let errored = std::panic::catch_unwind(AssertUnwindSafe(|| test(&mut animation))).is_err();