diff examples/anmrenderer.rs @ 717:d5d5496e4e53

examples: Propagate image loading errors.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Mon, 23 Sep 2019 14:01:35 +0200
parents 5016c09e5d7c
children 0a250ddfae79
line wrap: on
line diff
--- a/examples/anmrenderer.rs
+++ b/examples/anmrenderer.rs
@@ -132,7 +132,7 @@ fn main() {
     let mut surface = GlfwSurface::new(WindowDim::Windowed(384, 448), "Touhou", WindowOpt::default()).unwrap();
 
     // Open the image atlas matching this ANM.
-    let tex = load_anm_image(&mut surface, &anm0, anm_filename);
+    let tex = load_anm_image(&mut surface, &anm0, anm_filename).expect("image loading");
 
     // set the uniform interface to our type so that we can read textures from the shader
     let program =