bwasty / gltf-viewer

glTF 2.0 Viewer written in Rust
The Unlicense
188 stars 31 forks source link

Fixed ambiguous import compilation error. #55

Closed isegal closed 5 years ago

isegal commented 5 years ago

This fixed the build on Rust 1.31.0 where it was not building due to the following error:

cargo build
   Compiling gltf-viewer v0.4.1-alpha.0 (gltf-viewer)
error[E0659]: `Texture` is ambiguous (glob import vs glob import in the same module)
 --> src\render\root.rs:8:26
  |
8 | use render::{Mesh, Node, Texture, Material};
  |                          ^^^^^^^ ambiguous name
  |
note: `Texture` could refer to the struct imported here
 --> src\render\mod.rs:18:9
  |
18| pub use self::texture::*;
  |         ^^^^^^^^^^^^^^^^
  = help: consider adding an explicit import of `Texture` to disambiguate
note: `Texture` could also refer to the struct imported here
 --> src\render\mod.rs:13:9
  |
13| pub use self::primitive::*;
  |         ^^^^^^^^^^^^^^^^^^
  = help: consider adding an explicit import of `Texture` to disambiguate

error[E0659]: `Texture` is ambiguous (glob import vs glob import in the same module)
 --> src\render\material.rs:7:21
  |
7 | use render::{ Root, Texture };
  |                     ^^^^^^^ ambiguous name
  |
note: `Texture` could refer to the struct imported here
 --> src\render\mod.rs:18:9
  |
18| pub use self::texture::*;
  |         ^^^^^^^^^^^^^^^^
  = help: consider adding an explicit import of `Texture` to disambiguate
note: `Texture` could also refer to the struct imported here
 --> src\render\mod.rs:13:9
  |
13| pub use self::primitive::*;
  |         ^^^^^^^^^^^^^^^^^^
  = help: consider adding an explicit import of `Texture` to disambiguate

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0659`.
error: Could not compile `gltf-viewer`.

To learn more, run the command again with --verbose.
bwasty commented 5 years ago

Thanks!