Skip to content

Commit

Permalink
Fix clippy warning unused field
Browse files Browse the repository at this point in the history
  • Loading branch information
flomonster committed Dec 6, 2024
1 parent 3fdc587 commit 89ddba6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ where
P: AsRef<Path>,
{
// Run gltf
let (doc, buffers, images) = gltf::import(&path)?;
let (doc, buffers, _images) = gltf::import(&path)?;

// Init data and collection useful for conversion
let mut data = GltfData::new(buffers, images, &path);
let mut data = GltfData::new(buffers, &path);

// Convert gltf -> easy_gltf
let mut res = vec![];
Expand Down
4 changes: 1 addition & 3 deletions src/utils/gltf_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use std::sync::Arc;
/// Helps to simplify the signature of import related functions.
pub struct GltfData {
pub buffers: Vec<gltf::buffer::Data>,
pub images: Vec<gltf::image::Data>,
pub base_dir: PathBuf,
pub materials: HashMap<Option<usize>, Arc<Material>>,
pub rgb_images: HashMap<usize, Arc<RgbImage>>,
Expand All @@ -19,15 +18,14 @@ pub struct GltfData {
}

impl GltfData {
pub fn new<P>(buffers: Vec<gltf::buffer::Data>, images: Vec<gltf::image::Data>, path: P) -> Self
pub fn new<P>(buffers: Vec<gltf::buffer::Data>, path: P) -> Self
where
P: AsRef<Path>,
{
let mut base_dir = PathBuf::from(path.as_ref());
base_dir.pop();
GltfData {
buffers,
images,
base_dir,
materials: Default::default(),
rgb_images: Default::default(),
Expand Down

0 comments on commit 89ddba6

Please sign in to comment.