KernelFreeze / Litecraft

Open source, clean room implementation of Minecraft Client
MIT License
138 stars 6 forks source link

Item `f32` is imported redundantly. Litecraft not compiling. #23

Open mallgrab opened 5 years ago

mallgrab commented 5 years ago

Using latest nightly, will not compile since std::f32 got imported twice in src/core/camera/mod.rs

Expected Behavior 🤔

Successful compilation.

Current Behavior 😔

error: the item `f32` is imported redundantly
   --> src/core/camera/mod.rs:109:13
    |
18  | use std::f32;
    |     -------- the item `f32` is already imported here
...
109 |         use std::f32;
    |             ^^^^^^^^
    |
note: lint level defined here
   --> src/main.rs:19:9
    |
19  | #![deny(unused_imports)]
    |         ^^^^^^^^^^^^^^
error: aborting due to previous error
error: Could not compile `litecraft`.

Possible Solution 😅

Remove the line at 109 in src/core/camera/mod.rs

Steps to Reproduce 😱

  1. Update Rust to the latest nightly.
  2. Run 'cargo run'
iceiix commented 3 years ago

Both use std::f32 lines can be removed, the primitive type f32 is already available by default without imports