diff options
author | tcmal <me@aria.rip> | 2024-08-25 17:44:21 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-25 17:44:21 +0100 |
commit | 2111c1248b08236a839dcf22036f92735bceb31c (patch) | |
tree | 9313da344b7134a913d1d917162e55b35fe1e74f /stockton-levels/src/q3/entities.rs | |
parent | 102e166b040030b590df83888a1d1a47d0130f10 (diff) |
chore(all): style formatting and clippy fixes
Diffstat (limited to 'stockton-levels/src/q3/entities.rs')
-rw-r--r-- | stockton-levels/src/q3/entities.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/stockton-levels/src/q3/entities.rs b/stockton-levels/src/q3/entities.rs index 4382ef2..950d89a 100644 --- a/stockton-levels/src/q3/entities.rs +++ b/stockton-levels/src/q3/entities.rs @@ -15,13 +15,13 @@ // You should have received a copy of the GNU General Public License // along with stockton-bsp. If not, see <http://www.gnu.org/licenses/>. -use std::str; use std::collections::HashMap; +use std::str; -use crate::types::{Result, ParseError}; -use crate::traits::entities::*; use super::Q3BSPFile; use crate::coords::CoordSystem; +use crate::traits::entities::*; +use crate::types::{ParseError, Result}; const QUOTE: u8 = b'"'; const END_BRACKET: u8 = b'}'; @@ -72,7 +72,10 @@ pub fn from_data(data: &[u8]) -> Result<Box<[Entity]>> { state = ParseState::InsideEntity; val_end = i; - attrs.insert(string[key_start..key_end].to_owned(), string[val_start..val_end].to_owned()); + attrs.insert( + string[key_start..key_end].to_owned(), + string[val_start..val_end].to_owned(), + ); } _ => { return Err(ParseError::Invalid); @@ -103,7 +106,7 @@ pub fn from_data(data: &[u8]) -> Result<Box<[Entity]>> { impl<T: CoordSystem> HasEntities for Q3BSPFile<T> { type EntitiesIter<'a> = std::slice::Iter<'a, Entity>; - fn entities_iter<'a>(&'a self) -> Self::EntitiesIter<'a> { + fn entities_iter(&self) -> Self::EntitiesIter<'_> { self.entities.iter() } } |