Update to glium 0.25.1
authorBernie Innocenti <bernie@codewiz.org>
Tue, 22 Oct 2019 13:57:54 +0000 (22:57 +0900)
committerBernie Innocenti <bernie@codewiz.org>
Tue, 22 Oct 2019 13:57:54 +0000 (22:57 +0900)
Cargo.toml
lib.rs
text.rs

index 114864e83fbc92114ccc098978c9a08ff4c9d614..42244c2016c1d9285ae4ba2504169664258a0d2c 100644 (file)
@@ -15,7 +15,7 @@ opt-level = 3
 [dependencies]
 cgmath = "*"
 #gleam = "*"
-glium = "0.23"
+glium = "0.25.1"
 glutin = "0.21"
 image = { version = "*", features = ["png_codec"], optional = true }
 libxm = "1.0.0"
diff --git a/lib.rs b/lib.rs
index c923d0831fbd8e6dd14f374df4fc3dbb7dc906fd..25e275c56e2140f07e6079599278c149b7ec13b4 100644 (file)
--- a/lib.rs
+++ b/lib.rs
@@ -13,7 +13,7 @@ pub use crate::shaded_cube::ShadedCube;
 
 #[cfg(feature = "image")]
 pub fn screenshot(display : &glium::Display) {
-    let image: glium::texture::RawImage2d<'_, u8> = display.read_front_buffer();
+    let image: glium::texture::RawImage2d<'_, u8> = display.read_front_buffer().unwrap();
     let image = image::ImageBuffer::from_raw(image.width, image.height, image.data.into_owned()).unwrap();
     let image = image::DynamicImage::ImageRgba8(image).flipv().to_rgb();
     let image = image::DynamicImage::ImageRgb8(image);
diff --git a/text.rs b/text.rs
index c341959c55beb7ab678969f57b45c821e0c1c1bd..3d5d73cfcf92688095d43f2fb30c7e1d2512887a 100644 (file)
--- a/text.rs
+++ b/text.rs
@@ -22,7 +22,6 @@ where
 
 #[cfg(feature = "image")]
 fn c64_font() -> (u32, u32, Vec<u8>) {
-    use image;
     let image = image::load_from_memory_with_format(
         &include_bytes!("textures/c64-font.png")[..],
         image::PNG,