diff examples/common.rs @ 708:3954801b6299

examples: Update to luminance 0.32.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 08 Sep 2019 17:47:23 +0200
parents 987409d48991
children 2b2376811f46
line wrap: on
line diff
--- a/examples/common.rs
+++ b/examples/common.rs
@@ -37,7 +37,7 @@ fn load_rgb_png(surface: &mut GlfwSurfac
                 Texture::new(surface, [width, height], 0, &Sampler::default()).expect("luminance texture creation");
 
             // the first argument disables mipmap generation (we don’t care so far)
-            tex.upload(GenMipmaps::No, &texels);
+            tex.upload(GenMipmaps::No, &texels).unwrap();
 
             Some(LoadedTexture::Rgb(tex))
         }
@@ -81,7 +81,7 @@ fn load_rgb_a_pngs(surface: &mut GlfwSur
                 Texture::new(surface, [width, height], 0, &Sampler::default()).expect("luminance texture creation");
 
             // the first argument disables mipmap generation (we don’t care so far)
-            tex.upload(GenMipmaps::No, &texels);
+            tex.upload(GenMipmaps::No, &texels).unwrap();
 
             Some(LoadedTexture::Rgba(tex))
         }