mirror of
https://codeberg.org/icewind/vbsp.git
synced 2026-06-03 18:54:05 +02:00
clippy fixes
This commit is contained in:
parent
e348934ec5
commit
3cdb50636d
3 changed files with 6 additions and 6 deletions
|
|
@ -52,7 +52,7 @@ impl<'a> BspFile<'a> {
|
||||||
let raw_data = self
|
let raw_data = self
|
||||||
.data
|
.data
|
||||||
.get(lump.offset as usize..lump.offset as usize + lump.length as usize)
|
.get(lump.offset as usize..lump.offset as usize + lump.length as usize)
|
||||||
.ok_or_else(|| BspError::LumpOutOfBounds(lump.clone()))?;
|
.ok_or_else(|| BspError::LumpOutOfBounds(*lump))?;
|
||||||
|
|
||||||
Ok(match lump.ident {
|
Ok(match lump.ident {
|
||||||
0 => Cow::Borrowed(raw_data),
|
0 => Cow::Borrowed(raw_data),
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ impl<'a> Entity<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Iter { buf: &self.buf }
|
Iter { buf: self.buf }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,8 @@ impl<T> Clone for Handle<'_, T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, T> Handle<'a, T> {
|
impl<'a, T> AsRef<T> for Handle<'a, T> {
|
||||||
pub fn as_ref(&self) -> &'a T {
|
fn as_ref(&self) -> &'a T {
|
||||||
self.data
|
self.data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -105,7 +105,7 @@ impl<'a> IntoIterator for &'a Leaves {
|
||||||
type Item = &'a Leaf;
|
type Item = &'a Leaf;
|
||||||
|
|
||||||
fn into_iter(self) -> Self::IntoIter {
|
fn into_iter(self) -> Self::IntoIter {
|
||||||
(&self.leaves[..]).into_iter()
|
(&self.leaves[..]).iter()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -114,7 +114,7 @@ impl<'a> IntoIterator for &'a mut Leaves {
|
||||||
type Item = &'a mut Leaf;
|
type Item = &'a mut Leaf;
|
||||||
|
|
||||||
fn into_iter(self) -> Self::IntoIter {
|
fn into_iter(self) -> Self::IntoIter {
|
||||||
(&mut self.leaves[..]).into_iter()
|
self.leaves.iter_mut()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue