From b4ed4a656c6912b9a04c2acd063bde89e35a04be Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Sun, 13 Nov 2022 08:53:40 -0500 Subject: [PATCH 1/5] Fixed warning when running the atlas feature. Make sure we CI features. --- .github/workflows/ci.yml | 7 +++++++ .github/workflows/code_quality.yml | 14 +++++++++++++- src/render/mod.rs | 3 +-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae2bad36..e84f0214 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,12 @@ jobs: with: command: check args: --all-targets + + - name: Run cargo check feature atlas + uses: actions-rs/cargo@v1 + with: + command: check + args: --all-targets --features atlas # test: # name: Tests @@ -63,3 +69,4 @@ jobs: with: toolchain: stable - run: cargo build --examples + - run: cargo build --examples --features atlas diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml index 4e24fdd5..a100cde8 100644 --- a/.github/workflows/code_quality.yml +++ b/.github/workflows/code_quality.yml @@ -26,7 +26,13 @@ jobs: uses: actions-rs/cargo@v1 with: command: fmt - args: --all -- --check + args: --all -- --check + + - name: Run cargo fmt --feature atlas + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check --features atlas clippy: name: Clippy @@ -50,3 +56,9 @@ jobs: with: command: clippy args: --no-deps -- -D warnings + + - name: Run cargo clippy feature atlas + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --no-deps -- -D warnings --features atlas \ No newline at end of file diff --git a/src/render/mod.rs b/src/render/mod.rs index 059612f8..3af59806 100644 --- a/src/render/mod.rs +++ b/src/render/mod.rs @@ -1,6 +1,5 @@ use std::marker::PhantomData; -use bevy::render::render_asset::RenderAssets; use bevy::{ asset::load_internal_asset, core_pipeline::core_2d::Transparent2d, @@ -321,7 +320,7 @@ fn prepare_textures( render_device: Res, mut texture_array_cache: ResMut, extracted_tilemap_textures: Query<&ExtractedTilemapTexture>, - render_images: Res>, + render_images: Res>, ) { for extracted_texture in extracted_tilemap_textures.iter() { texture_array_cache.add_extracted_texture(extracted_texture); From 797c80d8d1296d0d5da279e2b851a03a83aa9651 Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Sun, 13 Nov 2022 08:56:13 -0500 Subject: [PATCH 2/5] Removed fmt feature check as it does not matter. --- .github/workflows/code_quality.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml index a100cde8..1a00f4cc 100644 --- a/.github/workflows/code_quality.yml +++ b/.github/workflows/code_quality.yml @@ -28,12 +28,6 @@ jobs: command: fmt args: --all -- --check - - name: Run cargo fmt --feature atlas - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check --features atlas - clippy: name: Clippy runs-on: ubuntu-latest From 15c446901b7498788a906b937d3a9b7f84944636 Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Sun, 13 Nov 2022 09:02:36 -0500 Subject: [PATCH 3/5] Removed unnecessary clippy command. --- .github/workflows/code_quality.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml index 1a00f4cc..166f9d9a 100644 --- a/.github/workflows/code_quality.yml +++ b/.github/workflows/code_quality.yml @@ -50,9 +50,4 @@ jobs: with: command: clippy args: --no-deps -- -D warnings - - - name: Run cargo clippy feature atlas - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --no-deps -- -D warnings --features atlas \ No newline at end of file + \ No newline at end of file From 497aca381dc17bd9be7872526423d861c99549c9 Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Sun, 13 Nov 2022 10:09:44 -0500 Subject: [PATCH 4/5] Fix examples so they work for the atlas feature. --- examples/helpers/camera.rs | 1 + examples/texture_container.rs | 199 ++++++++++++++++++---------------- examples/texture_vec.rs | 17 ++- 3 files changed, 122 insertions(+), 95 deletions(-) diff --git a/examples/helpers/camera.rs b/examples/helpers/camera.rs index 51edc2de..a6068e4c 100644 --- a/examples/helpers/camera.rs +++ b/examples/helpers/camera.rs @@ -1,6 +1,7 @@ use bevy::{input::Input, math::Vec3, prelude::*, render::camera::Camera}; // A simple camera system for moving and zooming the camera. +#[allow(dead_code)] pub fn movement( time: Res