Skip to content

Commit

Permalink
Fix fun and exciting new clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
aevyrie committed Dec 5, 2024
1 parent 750a9a7 commit d9f531e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub struct ReferenceFrameCommands<'a, P: GridPrecision> {
reference_frame: ReferenceFrame<P>,
}

impl<'a, P: GridPrecision> ReferenceFrameCommands<'a, P> {
impl<P: GridPrecision> ReferenceFrameCommands<'_, P> {
/// Get a reference to the current reference frame.
pub fn frame(&mut self) -> &ReferenceFrame<P> {
&self.reference_frame
Expand Down Expand Up @@ -173,7 +173,7 @@ impl<'a, P: GridPrecision> ReferenceFrameCommands<'a, P> {
}

/// Insert the reference frame on drop.
impl<'a, P: GridPrecision> Drop for ReferenceFrameCommands<'a, P> {
impl<P: GridPrecision> Drop for ReferenceFrameCommands<'_, P> {
fn drop(&mut self) {
self.commands
.entity(self.entity)
Expand All @@ -188,7 +188,7 @@ pub struct SpatialEntityCommands<'a, P: GridPrecision> {
phantom: PhantomData<P>,
}

impl<'a, P: GridPrecision> SpatialEntityCommands<'a, P> {
impl<P: GridPrecision> SpatialEntityCommands<'_, P> {
/// Insert a component on this reference frame
pub fn insert(&mut self, bundle: impl Bundle) -> &mut Self {
self.commands.entity(self.entity).insert(bundle);
Expand Down
4 changes: 2 additions & 2 deletions src/reference_frame/local_origin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ pub struct ReferenceFrames<'w, 's, P: GridPrecision> {
frame_query: Query<'w, 's, (Entity, Read<ReferenceFrame<P>>, Option<Read<Parent>>)>,
}

impl<'w, 's, P: GridPrecision> ReferenceFrames<'w, 's, P> {
impl<P: GridPrecision> ReferenceFrames<'_, '_, P> {
/// Get a [`ReferenceFrame`] from its `Entity`.
pub fn get(&self, frame_entity: Entity) -> &ReferenceFrame<P> {
self.frame_query
Expand Down Expand Up @@ -301,7 +301,7 @@ pub struct ReferenceFramesMut<'w, 's, P: GridPrecision> {
frame_query: Query<'w, 's, (Entity, Write<ReferenceFrame<P>>, Option<Read<Parent>>)>,
}

impl<'w, 's, P: GridPrecision> ReferenceFramesMut<'w, 's, P> {
impl<P: GridPrecision> ReferenceFramesMut<'_, '_, P> {
/// Get mutable access to the [`ReferenceFrame`], and run the provided function or closure,
/// optionally returning data.
///
Expand Down
4 changes: 2 additions & 2 deletions src/world_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub struct GridTransform<P: GridPrecision> {
pub cell: &'static mut GridCell<P>,
}

impl<'w, P: GridPrecision> GridTransformItem<'w, P> {
impl<P: GridPrecision> GridTransformItem<'_, P> {
/// Compute the global position with double precision.
pub fn position_double(&self, reference_frame: &ReferenceFrame<P>) -> DVec3 {
reference_frame.grid_position_double(&self.cell, &self.transform)
Expand All @@ -41,7 +41,7 @@ impl<'w, P: GridPrecision> GridTransformItem<'w, P> {
}
}

impl<'w, P: GridPrecision> GridTransformReadOnlyItem<'w, P> {
impl<P: GridPrecision> GridTransformReadOnlyItem<'_, P> {
/// Compute the global position with double precision.
pub fn position_double(&self, reference_frame: &ReferenceFrame<P>) -> DVec3 {
reference_frame.grid_position_double(self.cell, self.transform)
Expand Down

0 comments on commit d9f531e

Please sign in to comment.