diff src/th06/ecl_vm.rs @ 716:5016c09e5d7c

Fix some warnings.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Mon, 23 Sep 2019 13:49:07 +0200
parents 464c1b02a996
children c187e0a6b751
line wrap: on
line diff
--- a/src/th06/ecl_vm.rs
+++ b/src/th06/ecl_vm.rs
@@ -1,7 +1,7 @@
 //! ECL runner.
 
 use crate::th06::ecl::{Ecl, SubInstruction};
-use crate::th06::enemy::{Enemy, BulletAttributes, Offset};
+use crate::th06::enemy::{Enemy, Offset};
 use crate::util::prng::Prng;
 use std::cell::RefCell;
 use std::rc::Rc;
@@ -733,7 +733,7 @@ impl EclRunner {
             // 91
             // wat
             SubInstruction::LaserSetCompare(laser_id) => {
-                let mut enemy = self.enemy.borrow_mut();
+                let enemy = self.enemy.borrow_mut();
                 // in game it checks if either the laser exists OR if one of its member is set to 0
                 // which, uhhhh, we are not going to reimplement for obvious reasons
                 // the correct implementation would be: if this laser does not exist have a
@@ -829,7 +829,7 @@ impl EclRunner {
             }
             // 101
             SubInstruction::SetBossMode(value) => {
-                let mut enemy = self.enemy.borrow_mut();
+                let enemy = self.enemy.borrow_mut();
                 if value < 0 {
                     enemy.set_boss(false);
                 }
@@ -872,7 +872,7 @@ impl EclRunner {
 
             // 106
             SubInstruction::PlaySound(index) => {
-                let mut enemy = self.enemy.borrow_mut();
+                let enemy = self.enemy.borrow_mut();
                 enemy.play_sound(index);
             }