Apply strict linting to release builds #75

Merged
savanni merged 21 commits from clippy-linting into main 2023-10-05 17:01:49 +00:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit 5443015868 - Show all commits

View File

@ -5,7 +5,7 @@ pub struct Latitude(f32);
impl From<f32> for Latitude {
fn from(val: f32) -> Self {
if val > 90.0 || val < -90.0 {
if !(-90.0..=90.0).contains(&val) {
panic!("Latitude is outside of range");
}
Self(val)
@ -23,7 +23,7 @@ pub struct Longitude(f32);
impl From<f32> for Longitude {
fn from(val: f32) -> Self {
if val > 180.0 || val < -180.0 {
if !(-180.0..=180.0).contains(&val) {
panic!("Longitude is outside fo range");
}
Self(val)