Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Uriopass committed Jul 26, 2023
1 parent 8d505e7 commit 154cc4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion egregoria/src/utils/replay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl EgregoriaReplayLoader {
goria.tick(schedule, &[]);
self.pastt.0 += 1;
ticks_left -= 1;
if ticks_left <= 0 {
if ticks_left == 0 {
return false;
}
}
Expand Down
8 changes: 4 additions & 4 deletions geom/src/polyline3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,13 @@ impl PolyLine3 {
self.points_dirs_manual().into_iter(dists)
}

pub fn points_dirs_manual(&self) -> PointsAlongs<'_> {
pub fn points_dirs_manual(&self) -> PointsAlongs3<'_> {
let mut windows = self.points.windows(2);
let (dir, dist) = windows
.next()
.and_then(|w| (w[1] - w[0]).dir_dist())
.unwrap_or((Vec3::X, 0.0));
PointsAlongs {
PointsAlongs3 {
windows,
lastp: self.first(),
dir,
Expand Down Expand Up @@ -423,15 +423,15 @@ impl Index<usize> for PolyLine3 {
}
}

pub struct PointsAlongs<'a> {
pub struct PointsAlongs3<'a> {
windows: Windows<'a, Vec3>,
lastp: Vec3,
dir: Vec3,
dist: f32,
partial: f32,
}

impl<'a> PointsAlongs<'a> {
impl<'a> PointsAlongs3<'a> {
pub fn next(&mut self, d: f32) -> Option<(Vec3, Vec3)> {
while d > self.partial + self.dist {
let w = self.windows.next()?;
Expand Down

0 comments on commit 154cc4d

Please sign in to comment.