diff options
author | tcmal <me@aria.rip> | 2024-08-25 17:44:20 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-25 17:44:20 +0100 |
commit | 51168c753286eeee64410ab19dc9f78a4ea479e4 (patch) | |
tree | d384093c6fd11b36b189013b663f3500b18ec2a4 /stockton-levels/src/q3/effects.rs | |
parent | d076d3a6fd484e298915cd85609ba9706abacc87 (diff) |
refactor(all): use new traits-based levels everywhere else.
unfortunately this also starts using an unstable feature - generic_associated_types
see rust-lang/rust#44265
Diffstat (limited to 'stockton-levels/src/q3/effects.rs')
-rw-r--r-- | stockton-levels/src/q3/effects.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stockton-levels/src/q3/effects.rs b/stockton-levels/src/q3/effects.rs index 2a76da9..0fddfb7 100644 --- a/stockton-levels/src/q3/effects.rs +++ b/stockton-levels/src/q3/effects.rs @@ -50,14 +50,14 @@ pub fn from_data(data: &[u8], n_brushes: u32) -> Result<Box<[Effect]>> { } -impl<'a> HasEffects<'a> for Q3BSPFile { - type EffectsIter = std::slice::Iter<'a, Effect>; +impl HasEffects for Q3BSPFile { + type EffectsIter<'a> = std::slice::Iter<'a, Effect>; - fn effects_iter(&'a self) -> Self::EffectsIter { + fn effects_iter<'a>(&'a self) -> Self::EffectsIter<'a> { self.effects.iter() } - fn get_effect(&'a self, index: u32) -> &'a Effect { + fn get_effect<'a>(&'a self, index: u32) -> &'a Effect { &self.effects[index as usize] } } |