mirror of
https://github.com/bevyengine/bevy
synced 2024-11-24 21:53:07 +00:00
resolve warnings
This commit is contained in:
parent
f24a274a2a
commit
cd6ccc45b1
4 changed files with 6 additions and 13 deletions
|
@ -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;
|
||||
}
|
||||
})
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue