cleanup redundant function

This commit is contained in:
scott-c 2020-08-04 20:03:01 +08:00
parent ba301696f4
commit bb8ba75287
3 changed files with 2 additions and 4 deletions

View File

@ -25,7 +25,7 @@ impl Component for Vel {
pub struct Ori(pub Dir);
impl Ori {
pub fn vec(&self) -> &Vec3<f32> { &self.0.vec() }
pub fn vec(&self) -> &Vec3<f32> { &*self.0 }
}
impl Component for Ori {

View File

@ -87,8 +87,6 @@ impl Dir {
}
pub fn is_valid(&self) -> bool { !self.0.map(f32::is_nan).reduce_or() && self.is_normalized() }
pub fn vec(&self) -> &Vec3<f32> { &self.0 }
}
impl std::ops::Deref for Dir {

View File

@ -204,7 +204,7 @@ impl<'a> TryFrom<&'a Outcome> for SfxEventItem {
Outcome::ProjectileShot { pos, .. } => {
Ok(Self::new(SfxEvent::ProjectileShot, Some(*pos), None))
},
_ => Err(()),
// _ => Err(()),
}
}
}