Skip to content

Commit

Permalink
fix(linting): increased compiler version and improved linting
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskw1999 committed Jun 16, 2024
1 parent ca79361 commit 0d8c010
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/collision.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ fn is_point_on_line(point_coord: &Coord, (start_coord, end_coord): (&Coord, &Coo
let Coord { x: x2, y: y2 } = end_coord;

let cross_product = (py - y1) * (x2 - x1) - (px - x1) * (y2 - y1);
if cross_product.abs() > std::f64::EPSILON {
if cross_product.abs() > f64::EPSILON {
return false;
}

Expand Down
9 changes: 1 addition & 8 deletions src/letters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,18 +224,11 @@ impl Letter {
pub struct Word {
pub word: String,
pub starting_x: f64,
pub scale: u8,
pub color: Color,
}

impl Word {
pub fn new(word: String, starting_x: f64) -> Self {
Word {
word,
starting_x,
scale: 1,
color: Color::White,
}
Word { word, starting_x }
}
}

Expand Down

0 comments on commit 0d8c010

Please sign in to comment.