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/traits/vertices.rs | |
parent | 102e166b040030b590df83888a1d1a47d0130f10 (diff) |
chore(all): style formatting and clippy fixes
Diffstat (limited to 'stockton-levels/src/traits/vertices.rs')
-rw-r--r-- | stockton-levels/src/traits/vertices.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/stockton-levels/src/traits/vertices.rs b/stockton-levels/src/traits/vertices.rs index 7b14c98..ddf315b 100644 --- a/stockton-levels/src/traits/vertices.rs +++ b/stockton-levels/src/traits/vertices.rs @@ -15,12 +15,11 @@ // 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 crate::helpers::{slice_to_f32}; use crate::coords::CoordSystem; +use crate::helpers::slice_to_f32; use crate::types::RGBA; use na::Vector3; - /// A vertex, used to describe a face. #[derive(Debug, Clone, Copy, PartialEq)] pub struct Vertex { @@ -54,17 +53,17 @@ pub type MeshVert = u32; pub trait HasVertices<S: CoordSystem> { type VerticesIter<'a>: Iterator<Item = &'a Vertex>; - fn vertices_iter<'a>(&'a self) -> Self::VerticesIter<'a>; - fn get_vertex<'a>(&'a self, index: u32) -> &'a Vertex; + fn vertices_iter(&self) -> Self::VerticesIter<'_>; + fn get_vertex(&self, index: u32) -> &Vertex; } pub trait HasMeshVerts<S: CoordSystem>: HasVertices<S> { type MeshVertsIter<'a>: Iterator<Item = &'a MeshVert>; - fn meshverts_iter<'a>(&'a self) -> Self::MeshVertsIter<'a>; + fn meshverts_iter(&self) -> Self::MeshVertsIter<'_>; fn get_meshvert(&self, index: u32) -> MeshVert; - fn resolve_meshvert<'a>(&'a self, index: u32, base: u32) -> &'a Vertex { + fn resolve_meshvert(&self, index: u32, base: u32) -> &Vertex { self.get_vertex(self.get_meshvert(index) + base) } -}
\ No newline at end of file +} |