Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

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

Open
mallgrab opened this issue Apr 16, 2019 · 1 comment · May be fixed by #30
Open

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

mallgrab opened this issue Apr 16, 2019 · 1 comment · May be fixed by #30
Assignees
Labels

Comments

@mallgrab
Copy link

mallgrab commented Apr 16, 2019

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
Copy link

iceiix commented Dec 28, 2020

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

iceiix added a commit to iceiix/Litecraft that referenced this issue Dec 28, 2020
@iceiix iceiix linked a pull request Dec 28, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants