diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5109c40e..002ab6918 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,13 +4,12 @@ on: push: branches: - main - schedule: - - cron: "0 0 * * 1" jobs: rustfmt: name: Check rustfmt runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' steps: - name: Checkout uses: actions/checkout@v2 @@ -19,10 +18,11 @@ jobs: clippy: name: Run linter runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' strategy: matrix: - rust: ["1.64"] + rust: ["1.70"] env: RUSTFLAGS: -D warnings @@ -81,7 +81,7 @@ jobs: matrix: rust: - stable - - "1.64" + - "1.70" os: - ubuntu-latest - macos-latest diff --git a/Cargo.toml b/Cargo.toml index c0c9f5c09..f0438d14a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,3 +10,6 @@ members = [ "imgui-examples", "xtask", ] + +package.rust-version = "1.70" +resolver = "2" diff --git a/imgui-examples/Cargo.toml b/imgui-examples/Cargo.toml index a4bec547c..93c432dba 100644 --- a/imgui-examples/Cargo.toml +++ b/imgui-examples/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "imgui-examples" version = "0.1.0" -edition = "2018" +edition = "2021" description = "imgui crate examples using Glium backend" homepage = "https://github.com/imgui-rs/imgui-rs" repository = "https://github.com/imgui-rs/imgui-rs" diff --git a/imgui-glium-renderer/Cargo.toml b/imgui-glium-renderer/Cargo.toml index c5af40fb7..d96b7f09a 100644 --- a/imgui-glium-renderer/Cargo.toml +++ b/imgui-glium-renderer/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "imgui-glium-renderer" version = "0.11.0" -edition = "2018" +edition = "2021" description = "Glium renderer for the imgui crate" homepage = "https://github.com/imgui-rs/imgui-rs" repository = "https://github.com/imgui-rs/imgui-rs" diff --git a/imgui-glow-renderer/Cargo.toml b/imgui-glow-renderer/Cargo.toml index d9e6b24ba..d719fe964 100644 --- a/imgui-glow-renderer/Cargo.toml +++ b/imgui-glow-renderer/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "imgui-glow-renderer" version = "0.11.0" -edition = "2018" +edition = "2021" description = "glow renderer for the imgui crate" homepage = "https://github.com/imgui-rs/imgui-rs" repository = "https://github.com/imgui-rs/imgui-rs" diff --git a/imgui-sdl2-support/Cargo.toml b/imgui-sdl2-support/Cargo.toml index b9e67e4b1..5c26b98ab 100644 --- a/imgui-sdl2-support/Cargo.toml +++ b/imgui-sdl2-support/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "imgui-sdl2-support" version = "0.11.0" -edition = "2018" +edition = "2021" authors = ["The imgui-rs Developers"] description = "sdl2 support code for the imgui crate" homepage = "https://github.com/imgui-rs/imgui-rs" diff --git a/imgui-sys/Cargo.toml b/imgui-sys/Cargo.toml index f3346fccb..182f4938c 100644 --- a/imgui-sys/Cargo.toml +++ b/imgui-sys/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "imgui-sys" version = "0.11.0" -edition = "2018" +edition = "2021" description = "Raw FFI bindings to dear imgui" homepage = "https://github.com/imgui-rs/imgui-rs" repository = "https://github.com/imgui-rs/imgui-rs" diff --git a/imgui-winit-support/Cargo.toml b/imgui-winit-support/Cargo.toml index 598209584..8175d5fe9 100644 --- a/imgui-winit-support/Cargo.toml +++ b/imgui-winit-support/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "imgui-winit-support" version = "0.11.0" -edition = "2018" +edition = "2021" description = "winit support code for the imgui crate" homepage = "https://github.com/imgui-rs/imgui-rs" repository = "https://github.com/imgui-rs/imgui-rs" diff --git a/imgui/Cargo.toml b/imgui/Cargo.toml index 829d40257..2ef3abecb 100644 --- a/imgui/Cargo.toml +++ b/imgui/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "imgui" version = "0.11.0" -edition = "2018" +edition = "2021" description = "High-level Rust bindings to dear imgui" homepage = "https://github.com/imgui-rs/imgui-rs" repository = "https://github.com/imgui-rs/imgui-rs" diff --git a/imgui/src/render/draw_data.rs b/imgui/src/render/draw_data.rs index c93deb95d..55fa5d257 100644 --- a/imgui/src/render/draw_data.rs +++ b/imgui/src/render/draw_data.rs @@ -52,7 +52,6 @@ impl DrawData { /// Returns the number of draw lists included in the draw data. #[inline] pub fn draw_lists_count(&self) -> usize { - use std::convert::TryInto; self.cmd_lists_count.try_into().unwrap() } #[inline]