From e54411fdfa0d029e9db747171fe32497be8e227d Mon Sep 17 00:00:00 2001 From: LeMoustachu Date: Tue, 7 Mar 2023 15:22:53 +0100 Subject: [PATCH] fix: warnings --- src/lib.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index bc199fa..1a44de3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -62,7 +62,7 @@ pub fn get_coordinates(address: String) -> Result>, String> { struct DegreesMinutesSeconds { degrees: i32, minutes: i32, - seconds: f64, + _seconds: f64, bearing: Orientation, } @@ -75,7 +75,7 @@ enum Orientation { } impl DegreesMinutesSeconds { - fn is_latitude(self: Self) -> bool { + fn _is_latitude(self: Self) -> bool { if self.bearing == Orientation::North || self.bearing == Orientation::South { true } else { @@ -83,7 +83,7 @@ impl DegreesMinutesSeconds { } } - fn is_longitude(self: Self) -> bool { + fn _is_longitude(self: Self) -> bool { if self.bearing == Orientation::East || self.bearing == Orientation::West { true } else { @@ -102,7 +102,7 @@ impl Orientation { } } - fn is_northern(self: Self) -> bool { + fn _is_northern(self: Self) -> bool { if self == Orientation::North { true } else { @@ -111,7 +111,7 @@ impl Orientation { } - fn is_eastern(self: Self) -> bool { + fn _is_eastern(self: Self) -> bool { if self == Orientation::East { true } else { @@ -142,14 +142,14 @@ impl Orientation { fn dms_from_decimal(decimal: f64, mut bearing: Orientation) -> DegreesMinutesSeconds { let degrees = decimal.abs().trunc() as i32; let minutes = ((decimal.abs() - degrees as f64) * 60.0).trunc() as i32; - let seconds = ((((decimal.abs() - degrees as f64) * 60.0) - minutes as f64) * 60.0).trunc() as f64; + let _seconds = ((((decimal.abs() - degrees as f64) * 60.0) - minutes as f64) * 60.0).trunc() as f64; if decimal < 0.0 { bearing = bearing.opposite(); } DegreesMinutesSeconds { degrees, minutes, - seconds, + _seconds, bearing, } }