From 9a64350619cb8d6e6f192f5d8785ddf938bd9663 Mon Sep 17 00:00:00 2001 From: LoganDark Date: Sun, 21 Feb 2021 18:27:58 -0800 Subject: [PATCH 1/2] Update to Rust 2018 edition --- Cargo.toml | 1 + src/breakout.rs | 2 +- src/core.rs | 2 +- src/lib.rs | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c6255df..0413cf7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,6 +4,7 @@ version = "0.8.0" authors = ["shivshank"] description = "Quick and easy window creation, input, and high speed bitmap rendering" repository = "https://github.com/shivshank/mini_gl_fb" +edition = "2018" license = "MIT" diff --git a/src/breakout.rs b/src/breakout.rs index 630818c..fdea72c 100644 --- a/src/breakout.rs +++ b/src/breakout.rs @@ -2,7 +2,7 @@ //! [`Framebuffer`] object and manipulate them directly. use glutin::{WindowedContext, PossiblyCurrent, ContextError}; -use core::Framebuffer; +use crate::core::Framebuffer; use std::collections::HashMap; use glutin::event::{MouseButton, VirtualKeyCode, ModifiersState}; diff --git a/src/core.rs b/src/core.rs index dc21a98..3ace6ba 100644 --- a/src/core.rs +++ b/src/core.rs @@ -1,4 +1,4 @@ -use breakout::{GlutinBreakout, BasicInput}; +use crate::breakout::{GlutinBreakout, BasicInput}; use rustic_gl; diff --git a/src/lib.rs b/src/lib.rs index a79889e..4eaf389 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -117,9 +117,9 @@ pub mod breakout; pub use breakout::{GlutinBreakout, BasicInput}; pub use config::{Config, ConfigBuilder}; -pub use core::{Internal, BufferFormat, Framebuffer}; +pub use crate::core::{Internal, BufferFormat, Framebuffer}; -use core::ToGlType; +use crate::core::ToGlType; use glutin::event_loop::EventLoop; use glutin::dpi::LogicalSize; From 2d2c3682d9be0c017e55c1d7f1d9eaa5e138e393 Mon Sep 17 00:00:00 2001 From: dxb Date: Sat, 17 Jul 2021 19:43:01 -0400 Subject: [PATCH 2/2] Fix warning --- src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index 603ba85..217c46b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -32,9 +32,9 @@ use glutin::dpi::LogicalSize; /// /// If there's a config option you want to see or think is missing, please open an issue! #[non_exhaustive] +#[derive(Clone, PartialEq, Debug, Builder)] #[builder(default)] #[builder(build_fn(skip))] -#[derive(Clone, PartialEq, Debug, Builder)] pub struct Config { /// Sets the pixel dimensions of the buffer. The buffer will automatically stretch to fill the /// whole window. By default this will be the same as the window_size.