Remove unuse code

Rust 1.79 is starting to warn about those. For some reason, the unused
fields weren't caught before.
This commit is contained in:
Hanno Braun 2024-07-08 20:01:15 +02:00
parent d5c175f7fd
commit 8c241298e2
2 changed files with 2 additions and 15 deletions

View File

@ -43,14 +43,11 @@ pub struct Model {
#[derive(Debug)]
pub struct Material {
pub name: String,
pub diffuse_texture: super::texture::Texture,
pub bind_group: wgpu::BindGroup,
}
#[derive(Debug)]
pub struct Mesh {
pub name: String,
pub vertex_buffer: wgpu::Buffer,
pub index_buffer: wgpu::Buffer,
pub num_elements: u32,
@ -126,11 +123,7 @@ pub fn load_model(
label: None,
});
materials.push(Material {
name: m.name,
diffuse_texture,
bind_group,
})
materials.push(Material { bind_group })
}
let meshes = models
@ -164,7 +157,6 @@ pub fn load_model(
});
Mesh {
name: file_name.to_string(),
vertex_buffer,
index_buffer,
num_elements: m.mesh.indices.len() as u32,

View File

@ -2,7 +2,6 @@ use image::{GenericImageView, ImageError};
#[derive(Debug)]
pub struct Texture {
pub texture: wgpu::Texture,
pub view: wgpu::TextureView,
pub sampler: wgpu::Sampler,
}
@ -77,10 +76,6 @@ impl Texture {
..Default::default()
});
Self {
texture,
view,
sampler,
}
Self { view, sampler }
}
}