tversteeg/castle-game

Lots of unused stuff

Closed this issue · 1 comments

This happens when running cargo run --release

warning: unused variable: `ally_melee1`
  --> src\level.rs:80:33
   |
80 |     let (projectile1, bighole1, ally_melee1, enemy_soldier1, enemy_archer1) = {
   |                                 ^^^^^^^^^^^
   |
   = note: #[warn(unused_variables)] on by default
   = note: to avoid this warning, consider using `_ally_melee1` instead

warning: unused variable: `dt`
   --> src\terrain.rs:114:13
    |
114 |         let dt = dt.to_seconds();
    |             ^^
    |
    = note: to avoid this warning, consider using `_dt` instead

warning: unused variable: `entities`
   --> src\terrain.rs:116:14
    |
116 |         for (entities, mut rect) in (&*entities, &mut rect).join() {
    |              ^^^^^^^^
    |
    = note: to avoid this warning, consider using `_entities` instead

warning: unused variable: `rect`
   --> src\terrain.rs:116:24
    |
116 |         for (entities, mut rect) in (&*entities, &mut rect).join() {
    |                        ^^^^^^^^
    |
    = note: to avoid this warning, consider using `_rect` instead

warning: unused variable: `e_state`
  --> src\ai.rs:56:37
   |
56 |             for (e, _, e_pos, e_bb, e_state) in (&*entities, &enemy, &pos, &bb, &state).join() {
   |                                     ^^^^^^^
   |
   = note: to avoid this warning, consider using `_e_state` instead

warning: unused variable: `ubb`
  --> src\turret.rs:99:37
   |
99 |                 for (epos, _, walk, ubb, state) in (&wpos, &enemy, &walk, &ubb, &state).join() {
   |                                     ^^^
   |
   = note: to avoid this warning, consider using `_ubb` instead

warning: unused variable: `ubb`
   --> src\turret.rs:117:37
    |
117 |                 for (apos, _, walk, ubb, state) in (&wpos, &ally, &walk, &ubb, &state).join() {
    |                                     ^^^
    |
    = note: to avoid this warning, consider using `_ubb` instead

warning: method is never used: `x`
  --> src\geom.rs:53:5
   |
53 |     pub fn x(self) -> f64 {
   |     ^^^^^^^^^^^^^^^^^^^^^
   |
   = note: #[warn(dead_code)] on by default

warning: method is never used: `y`
  --> src\geom.rs:57:5
   |
57 |     pub fn y(self) -> f64 {
   |     ^^^^^^^^^^^^^^^^^^^^^

warning: method is never used: `width`
  --> src\geom.rs:61:5
   |
61 |     pub fn width(self) -> f64 {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

warning: method is never used: `height`
  --> src\geom.rs:65:5
   |
65 |     pub fn height(self) -> f64 {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^

Ah you can ignore these, they are left over from implementing some feature but not finishing it completely. It's a sort of TODO for myself but I guess it's nicer to just add that as a code comment. I'll remove them.