resolve warnings

This commit is contained in:
Carter Anderson 2020-02-11 19:10:38 -08:00
parent f24a274a2a
commit cd6ccc45b1
4 changed files with 6 additions and 13 deletions

View file

@ -15,7 +15,7 @@ fn build_move_system() -> Box<dyn Schedulable> {
.read_resource::<Time>()
.with_query(<(Write<Translation>, Write<Material>)>::query())
.build(move |_, world, time, person_query| {
for (mut translation, mut material) in person_query.iter_mut(world) {
for (mut translation, mut _material) in person_query.iter_mut(world) {
translation.0 += math::vec3(1.0, 0.0, 0.0) * time.delta_seconds;
}
})

View file

@ -1,7 +1,4 @@
use bevy::{
prelude::*,
render::render_graph_2::{uniform_selector, ShaderUniforms, StandardMaterial},
};
use bevy::{prelude::*, render::render_graph_2::StandardMaterial};
use rand::{rngs::StdRng, Rng, SeedableRng};
use std::collections::VecDeque;

View file

@ -11,13 +11,13 @@ fn setup(world: &mut World) {
let cube_handle = {
let mut mesh_storage = world.resources.get_mut::<AssetStorage<Mesh>>().unwrap();
let cube = Mesh::load(MeshType::Cube);
(mesh_storage.add(cube))
mesh_storage.add(cube)
};
let texture_handle = {
let mut texture_storage = world.resources.get_mut::<AssetStorage<Texture>>().unwrap();
let texture = Texture::load(TextureType::Data(asset::create_texels(256)));
(texture_storage.add(texture))
texture_storage.add(texture)
};
// cube

View file

@ -1,8 +1,4 @@
use bevy::{
asset,
prelude::*,
render::render_graph_2::{ShaderUniforms, StandardMaterial},
};
use bevy::{asset, prelude::*, render::render_graph_2::StandardMaterial};
fn main() {
AppBuilder::new().add_defaults().setup_world(setup).run();
@ -14,7 +10,7 @@ fn setup(world: &mut World) {
mesh_storage.add(Mesh::load(MeshType::Cube))
};
let texture_handle = {
let _texture_handle = {
let mut texture_storage = world.resources.get_mut::<AssetStorage<Texture>>().unwrap();
let texture = Texture::load(TextureType::Data(asset::create_texels(256)));
texture_storage.add(texture)